diff --git a/core/modules/dependencies.js b/core/modules/dependencies.js index 6f064dbfd..6d49c8695 100644 --- a/core/modules/dependencies.js +++ b/core/modules/dependencies.js @@ -68,7 +68,7 @@ Dependencies.prototype.hasChanged = function(changes,contextTiddlerTitle) { return true; } for(var c in changes) { - if(this.tiddlers.hasOwnProperty(c)) { + if($tw.utils.hop(this.tiddlers,c)) { return true; } } diff --git a/core/modules/macros/slider.js b/core/modules/macros/slider.js index 11d029df7..68323b56f 100644 --- a/core/modules/macros/slider.js +++ b/core/modules/macros/slider.js @@ -151,7 +151,7 @@ exports.executeMacro = function() { exports.refreshInDom = function(changes) { var needChildrenRefresh = true; // Avoid refreshing the children nodes if we don't need to // If the state tiddler has changed then reset the open state - if(this.hasParameter("state") && changes.hasOwnProperty(this.params.state)) { + if(this.hasParameter("state") && $tw.utils.hop(changes,this.params.state)) { this.isOpen = this.getOpenState(); } // Render the children if the slider is open and we don't have any children yet diff --git a/core/modules/macros/story.js b/core/modules/macros/story.js index 55998e853..b1a8d8cc0 100644 --- a/core/modules/macros/story.js +++ b/core/modules/macros/story.js @@ -39,7 +39,7 @@ exports.handleEvent = function(event) { template = this.hasParameter("defaultViewTemplate") ? this.params.defaultViewTemplate : "ViewTemplate"; storyTiddler = this.wiki.getTiddler(this.params.story); story = {tiddlers: []}; - if(storyTiddler && storyTiddler.fields.hasOwnProperty("text")) { + if(storyTiddler && $tw.utils.hop(storyTiddler.fields,"text")) { story = JSON.parse(storyTiddler.fields.text); } story.tiddlers.unshift({title: event.navigateTo, template: template}); @@ -52,7 +52,7 @@ exports.handleEvent = function(event) { template = this.hasParameter("defaultEditTemplate") ? this.params.defaultEditTemplate : "EditTemplate"; storyTiddler = this.wiki.getTiddler(this.params.story); story = {tiddlers: []}; - if(storyTiddler && storyTiddler.fields.hasOwnProperty("text")) { + if(storyTiddler && $tw.utils.hop(storyTiddler.fields,"text")) { story = JSON.parse(storyTiddler.fields.text); } for(t=0; t