« get me outta code hell

data: CacheableObject: allow falsy default update values - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-19 21:16:32 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-19 21:16:32 -0300
commitcebd7f4a32350f30c481b54d4777a6c910d5bcc1 (patch)
tree3d2aa1cacefd10e427488cc550ddbb6c3ba7366e
parentbb71dc843a51e41ef7c4567027676bf82aa44071 (diff)
data: CacheableObject: allow falsy default update values
-rw-r--r--src/data/cacheable-object.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data/cacheable-object.js b/src/data/cacheable-object.js
index 5e26c5f2..4a89b774 100644
--- a/src/data/cacheable-object.js
+++ b/src/data/cacheable-object.js
@@ -132,7 +132,7 @@ export default class CacheableObject {
         return;
       }
 
-      if (update?.default) {
+      if ('default' in update) {
         this[property] = update?.default;
       } else {
         this[property] = null;