diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 56c22cd38..48023658c 100644 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -742,38 +742,40 @@ exports.search = function(text,options) { // Function to check a given tiddler for the search term var searchTiddler = function(title) { if(!searchTermsRegExps) { - return !options.invert; + return false; } var tiddler = self.getTiddler(title); if(!tiddler) { tiddler = new $tw.Tiddler({title: title, text: "", type: "text/vnd.tiddlywiki"}); } - var contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type] || $tw.config.contentTypeInfo["text/vnd.tiddlywiki"]; - var match = true; + var contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type] || $tw.config.contentTypeInfo["text/vnd.tiddlywiki"], + match; for(var t=0; t