mirror of
https://github.com/mehotkhan/BandersnatchInteractive.git
synced 2025-07-27 17:23:22 +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) {
|
||||
return '(' + cond.slice(1).map(preconditionToJS).join(' == ') + ')';
|
||||
} else if (cond === false) {
|
||||
return false;
|
||||
return 'false';
|
||||
} else if (cond === true) {
|
||||
return true;
|
||||
return 'true';
|
||||
} else if (typeof cond === 'string') {
|
||||
return JSON.stringify(cond);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue