mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-06-01 14:14:06 +00:00
varlist operator: fixed crash accessing non-existent variable
See https://github.com/TiddlyWiki/TiddlyWiki5/pull/8972#issuecomment-2712068743
This commit is contained in:
parent
d69ecf4639
commit
a31df85894
@ -5,8 +5,6 @@ module-type: filteroperator
|
||||
|
||||
Retrieve the value of a variable as a list
|
||||
|
||||
[all[shadows+tiddlers]]
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
@ -18,9 +16,8 @@ Retrieve the value of a variable as a list
|
||||
Export our filter function
|
||||
*/
|
||||
exports.varlist = function(source,operator,options) {
|
||||
// Check for common optimisations
|
||||
var variableInfo = operator.operand && options.widget.getVariableInfo(operator.operand);
|
||||
if(variableInfo) {
|
||||
if(variableInfo && variableInfo.text !== undefined) {
|
||||
return options.wiki.makeTiddlerIterator(variableInfo.resultList);
|
||||
} else {
|
||||
return [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user