mirror of
https://github.com/mehotkhan/BandersnatchInteractive.git
synced 2025-07-28 01:33:23 +00:00
assets/scripts.js: Return strings from preconditionToJS
Minor correctness fix.
This commit is contained in:
parent
3e17def067
commit
927aeac7b4
1 changed files with 2 additions and 2 deletions
|
@ -60,9 +60,9 @@ function preconditionToJS(cond) {
|
||||||
} else if (cond[0] == 'eql' && cond.length == 3) {
|
} else if (cond[0] == 'eql' && cond.length == 3) {
|
||||||
return '(' + cond.slice(1).map(preconditionToJS).join(' == ') + ')';
|
return '(' + cond.slice(1).map(preconditionToJS).join(' == ') + ')';
|
||||||
} else if (cond === false) {
|
} else if (cond === false) {
|
||||||
return false;
|
return 'false';
|
||||||
} else if (cond === true) {
|
} else if (cond === true) {
|
||||||
return true;
|
return 'true';
|
||||||
} else if (typeof cond === 'string') {
|
} else if (typeof cond === 'string') {
|
||||||
return JSON.stringify(cond);
|
return JSON.stringify(cond);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue