mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
fix(admin): let panel break item
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -8,7 +8,7 @@ i18n_cache
|
|||||||
apidoc/html
|
apidoc/html
|
||||||
*.swp
|
*.swp
|
||||||
.idea*
|
.idea*
|
||||||
config.json
|
config*.json
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
lib
|
lib
|
||||||
newrelic_agent.log
|
newrelic_agent.log
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ export function castItemVal (itemPath, itemVal) {
|
|||||||
// Gear is true when you own it and false if you previously owned it but lost it (e.g., Death)
|
// Gear is true when you own it and false if you previously owned it but lost it (e.g., Death)
|
||||||
// Null, empty string, or undefined are taken to mean "unset" i.e. never owned.
|
// Null, empty string, or undefined are taken to mean "unset" i.e. never owned.
|
||||||
if (['null', '', 'undefined'].includes(itemVal)) return undefined;
|
if (['null', '', 'undefined'].includes(itemVal)) return undefined;
|
||||||
|
if (itemVal === 'false') return false;
|
||||||
return Boolean(itemVal);
|
return Boolean(itemVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user