Fix RSOD on invalid filter expressions

This commit is contained in:
Jeremy Ruston
2025-04-13 17:51:39 +01:00
parent 8dbb41ba2a
commit df529d7d7b
+5 -1
View File
@@ -247,7 +247,11 @@ exports.compileFilter = function(filterString,options) {
} catch(e) {
// We do not cache this result, so it adjusts along with localization changes
return function(source,widget) {
return [$tw.language.getString("Error/Filter") + ": " + e];
var resultsArray = [$tw.language.getString("Error/Filter") + ": " + e];
if(wrappers.done) {
wrappers.done(resultsArray);
}
return resultsArray;
};
}
// Get the hashmap of filter operator functions