1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-26 19:47:20 +00:00

Add isDraft to Tiddler object

Check to see if this tiddler is a draft (has a draft.of field)
This commit is contained in:
Devin Weaver 2014-04-25 08:44:34 -04:00
parent 540681b2bc
commit 23640d7af4

View File

@ -791,6 +791,10 @@ $tw.Tiddler.prototype.hasField = function(field) {
return $tw.utils.hop(this.fields,field); return $tw.utils.hop(this.fields,field);
}; };
$tw.Tiddler.prototype.isDraft = function() {
return this.hasField("draft.of");
};
/* /*
Register and install the built in tiddler field modules Register and install the built in tiddler field modules
*/ */