mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Ignore edition filters if not running on node (#5222)
This commit is contained in:
parent
85ff47366c
commit
a878d82c7a
@ -16,8 +16,9 @@ Filter operator for returning the descriptions of the specified edition names
|
||||
Export our filter function
|
||||
*/
|
||||
exports.editiondescription = function(source,operator,options) {
|
||||
var results = [],
|
||||
editionInfo = $tw.utils.getEditionInfo();
|
||||
var results = [];
|
||||
if($tw.node) {
|
||||
var editionInfo = $tw.utils.getEditionInfo();
|
||||
if(editionInfo) {
|
||||
source(function(tiddler,title) {
|
||||
if($tw.utils.hop(editionInfo,title)) {
|
||||
@ -25,6 +26,7 @@ exports.editiondescription = function(source,operator,options) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
|
@ -16,14 +16,16 @@ Filter operator for returning the names of the available editions in this wiki
|
||||
Export our filter function
|
||||
*/
|
||||
exports.editions = function(source,operator,options) {
|
||||
var results = [],
|
||||
editionInfo = $tw.utils.getEditionInfo();
|
||||
var results = [];
|
||||
if($tw.node) {
|
||||
var editionInfo = $tw.utils.getEditionInfo();
|
||||
if(editionInfo) {
|
||||
$tw.utils.each(editionInfo,function(info,name) {
|
||||
results.push(name);
|
||||
});
|
||||
}
|
||||
results.sort();
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user