mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-07 01:08:06 +00:00
Is draft (#6442)
* corrected [!is[draft]] to be a proper complement * Ensuring [is[draft]] and [!is[draft]] are complements * Made [is[draft]] more analogous to .isDraft()
This commit is contained in:
@@ -19,13 +19,13 @@ exports.draft = function(source,prefix,options) {
|
||||
var results = [];
|
||||
if(prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(!tiddler || !$tw.utils.hop(tiddler.fields,"draft.of")) {
|
||||
if(!tiddler || !tiddler.isDraft()) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && $tw.utils.hop(tiddler.fields,"draft.of") && (tiddler.fields["draft.of"].length !== 0)) {
|
||||
if(tiddler && tiddler.isDraft()) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user