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
|
||||
*.swp
|
||||
.idea*
|
||||
config.json
|
||||
config*.json
|
||||
npm-debug.log*
|
||||
lib
|
||||
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)
|
||||
// Null, empty string, or undefined are taken to mean "unset" i.e. never owned.
|
||||
if (['null', '', 'undefined'].includes(itemVal)) return undefined;
|
||||
if (itemVal === 'false') return false;
|
||||
return Boolean(itemVal);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user