mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Fix for LinkedLists when using bad filter prefix (#5251)
This commit is contained in:
parent
78c2beb640
commit
6ca89304a1
@ -297,7 +297,7 @@ exports.compileFilter = function(filterString) {
|
||||
return filterRunPrefixes[operation.namedPrefix](operationSubFunction, options);
|
||||
} else {
|
||||
return function(results,source,widget) {
|
||||
results.splice(0,results.length);
|
||||
results.clear();
|
||||
results.push($tw.language.getString("Error/FilterRunPrefix"));
|
||||
};
|
||||
}
|
||||
|
@ -12,6 +12,14 @@ Tests the reduce prefix and filter.
|
||||
/* global $tw, require */
|
||||
"use strict";
|
||||
|
||||
describe("general filter prefix tests", function() {
|
||||
it("should handle nonexistent prefixes gracefully", function() {
|
||||
var wiki = new $tw.Wiki();
|
||||
var results = wiki.filterTiddlers("[tag[A]] :nonexistent[tag[B]]");
|
||||
expect(results).toEqual(["Filter Error: Unknown prefix for filter run"]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("'reduce' and 'intersection' filter prefix tests", function() {
|
||||
|
||||
var wiki = new $tw.Wiki();
|
||||
|
Loading…
Reference in New Issue
Block a user