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
1 changed files with 4 additions and 0 deletions

View File

@ -791,6 +791,10 @@ $tw.Tiddler.prototype.hasField = function(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
*/