diff --git a/core/modules/filters/editiondescription.js b/core/modules/filters/editiondescription.js index bca03e9bc..ee3acd898 100644 --- a/core/modules/filters/editiondescription.js +++ b/core/modules/filters/editiondescription.js @@ -16,14 +16,16 @@ 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(); - if(editionInfo) { - source(function(tiddler,title) { - if($tw.utils.hop(editionInfo,title)) { - results.push(editionInfo[title].description || ""); - } - }); + var results = []; + if($tw.node) { + var editionInfo = $tw.utils.getEditionInfo(); + if(editionInfo) { + source(function(tiddler,title) { + if($tw.utils.hop(editionInfo,title)) { + results.push(editionInfo[title].description || ""); + } + }); + } } return results; }; diff --git a/core/modules/filters/editions.js b/core/modules/filters/editions.js index 36f1dc8fd..05ae57c31 100644 --- a/core/modules/filters/editions.js +++ b/core/modules/filters/editions.js @@ -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(); - if(editionInfo) { - $tw.utils.each(editionInfo,function(info,name) { - results.push(name); - }); + var results = []; + if($tw.node) { + var editionInfo = $tw.utils.getEditionInfo(); + if(editionInfo) { + $tw.utils.each(editionInfo,function(info,name) { + results.push(name); + }); + } + results.sort(); } - results.sort(); return results; };