kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fix for LinkedLists when using bad filter prefix (#5251)
rodzic
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();
|
||||
|
|
Ładowanie…
Reference in New Issue