From ae78b97596fd7e311ae92bea783a149e55774645 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 30 Mar 2012 16:42:35 +0100 Subject: [PATCH] Fixed logic for checking for a dependent context tiddler And added some documentation --- js/Dependencies.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/Dependencies.js b/js/Dependencies.js index 9f305f42c..27dc2afa7 100644 --- a/js/Dependencies.js +++ b/js/Dependencies.js @@ -1,10 +1,11 @@ /*\ title: js/Dependencies.js -Represents the dependencies of a tiddler or a parser node as two fields: +Represents the dependencies of a tiddler or a parser node as these fields: tiddlers: A hashmap of explicitly tiddler titles, with the value `false` if the dependency is skinny, and `true` if it is fat dependentAll: True if there is an implicit skinny dependency on all available tiddlers + dependentOnContextTiddler: True if the node has a fat dependency on the current context tiddler \*/ (function(){ @@ -62,7 +63,7 @@ Dependencies.prototype.hasChanged = function(changes,contextTiddlerTitle) { if(this.dependentAll) { return true; } - if(this.dependentOnContextTiddler && contextTiddlerTitle && changes.hasOwnProperty(contextTiddlerTitle)) { + if(!!this.dependentOnContextTiddler && contextTiddlerTitle !== undefined && changes.hasOwnProperty(contextTiddlerTitle)) { return true; } for(var c in changes) {