mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-02-02 02:36:46 +00:00
Fix crash when accessing variables in filters that don't have a widget context
This should catch a large number of crashes, including: Fixes #5716
This commit is contained in:
@@ -323,6 +323,9 @@ exports.compileFilter = function(filterString) {
|
||||
} else if(typeof source === "object") { // Array or hashmap
|
||||
source = self.makeTiddlerIterator(source);
|
||||
}
|
||||
if(!widget) {
|
||||
widget = $tw.rootWidget;
|
||||
}
|
||||
var results = new $tw.utils.LinkedList();
|
||||
$tw.utils.each(operationFunctions,function(operationFunction) {
|
||||
operationFunction(results,source,widget);
|
||||
|
||||
Reference in New Issue
Block a user