mirror of
https://github.com/NaN-tic/sao-base.git
synced 2023-12-14 03:13:01 +01:00
Fix is_leaf test
instanceof String doesn't work, we must use typeof
This commit is contained in:
parent
cb86e2c2aa
commit
6642eae6a0
|
@ -1931,7 +1931,7 @@
|
||||||
is_leaf: function(expression) {
|
is_leaf: function(expression) {
|
||||||
return ((expression instanceof Array) &&
|
return ((expression instanceof Array) &&
|
||||||
(expression.length > 2) &&
|
(expression.length > 2) &&
|
||||||
(expression[1] instanceof String));
|
(typeof expression[1] == 'string'));
|
||||||
},
|
},
|
||||||
eval_leaf: function(part, context, boolop) {
|
eval_leaf: function(part, context, boolop) {
|
||||||
if (boolop === undefined) {
|
if (boolop === undefined) {
|
||||||
|
|
Loading…
Reference in a new issue