History

some extra checks on settings values

James B. Pollack committed 10 years ago

Commit 2b1e6291 parent 39221921 file · +3 −2Browse files

Showing the changes to scripts/system/controllers/toggleAdvancedMovementForHandControllers.js (1 of 1 file). Show all

Unified · Split

scripts/system/controllers/toggleAdvancedMovementForHandControllers.js+3−2
@@ -15,12 +15,13 @@ var TURN_RATE = 1000; · 14 unmodified lines
1515 var MENU_ITEM_NAME = "Advanced Movement For Hand Controllers";
1616 var SETTINGS_KEY = 'advancedMovementForHandControllersIsChecked';
1717 var previousSetting = Settings.getValue(SETTINGS_KEY);
18−if (previousSetting === '' || previousSetting === false) {
18+if (previousSetting === '' || previousSetting === false || previousSetting === 'false') {
1919 previousSetting = false;
2020 isChecked = false;
2121 }
2222
23−if (previousSetting === true) {
23+if (previousSetting === true || previousSetting === 'true') {
24+ previousSetting = true;
2425 isChecked = true;
2526 }
2627