From 5f17e7d01b5d9b4306f7e8031e7c4856c4292133 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 24 Oct 2012 22:11:23 +0100 Subject: [PATCH] Fixed problem with list filter It was failing if the list tiddler was missing --- core/modules/filters.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/filters.js b/core/modules/filters.js index 7ba3c0147..0c95ad118 100644 --- a/core/modules/filters.js +++ b/core/modules/filters.js @@ -195,10 +195,10 @@ exports.operators = { "list": { // Select all tiddlers that are listed (or not listed) in the specified tiddler selector: function(operator) { if(operator.prefix === "!") { - return "var list = this.getTiddler(\"" + $tw.utils.stringify(operator.operand) + "\").fields.text.split(\"\\n\");" + + return "var list = this.getTextReference(\"" + $tw.utils.stringify(operator.operand) + "\",\"\").split(\"\\n\");" + "for(title in source) {if(list.indexOf(title) === -1) {$tw.utils.pushTop(subResults,title);}}"; } else { - return "$tw.utils.pushTop(subResults,this.getTiddler(\"" + $tw.utils.stringify(operator.operand) + "\").fields.text.split(\"\\n\"));"; + return "$tw.utils.pushTop(subResults,this.getTextReference(\"" + $tw.utils.stringify(operator.operand) + "\",\"\").split(\"\\n\"));"; } }, filter: function(operator) {