1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-03 10:43:16 +00:00

Fixed logic for checking for a dependent context tiddler

And added some documentation
This commit is contained in:
Jeremy Ruston 2012-03-30 16:42:35 +01:00
parent 46d34f5073
commit ae78b97596

View File

@ -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) {