fixed #249 - preserve variable value types with edge cases

(empty string, Boolean false)
pull/3/merge
jmoenig 2013-11-26 13:09:26 +01:00
rodzic 1b05a11f14
commit d3c735fade
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -2015,4 +2015,5 @@ ______
* Localization and Portuguese translation updates, thanks, Manuel!
* Catalan translation update, thanks, Bernat!!
* Threads: Text comparisons are now case-sensitive („fixes“ #175)
* Threads: fixed # 179 - dont identify primitive (static) C-Slots as implicit formal parameters
* Threads: fixed #179 - dont identify primitive (static) C-Slots as implicit formal parameters
* Threads: fixed #249 - preserve variable value types with edge cases (empty string, Boolean false)

Wyświetl plik

@ -2954,7 +2954,9 @@ VariableFrame.prototype.getVar = function (name, upvars) {
};
VariableFrame.prototype.addVar = function (name, value) {
this.vars[name] = (value === 0 ? 0 : value || null);
this.vars[name] = (value === 0 ? 0
: value === false ? false
: value === '' ? '' : value || null);
};
VariableFrame.prototype.deleteVar = function (name) {