« get me outta code hell

cacheable-object: don't validate default update value w/o validator - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-03-31 19:37:05 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-03-31 19:37:05 -0300
commit4b477c99f845de9af776b9f6e4bd466b22c2a925 (patch)
tree3f8c67763f8d2d87105816bbfe5e546fdb547dcd /src/data
parent18f9f8f77abd2ef6cf11671734546f82f7ee5828 (diff)
cacheable-object: don't validate default update value w/o validator
Diffstat (limited to 'src/data')
-rw-r--r--src/data/cacheable-object.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/data/cacheable-object.js b/src/data/cacheable-object.js
index 0071c60d..f63fe4bd 100644
--- a/src/data/cacheable-object.js
+++ b/src/data/cacheable-object.js
@@ -50,7 +50,10 @@ export default class CacheableObject {
       if (!flags.update) continue;
 
       if (typeof update === 'object' && update !== null && 'default' in update) {
-        validatePropertyValue(property, null, update.default, update);
+        if (update.validate) {
+          validatePropertyValue(property, null, update.default, update);
+        }
+
         this.prototype[CacheableObject.updateValue][property] = update.default;
       } else {
         this.prototype[CacheableObject.updateValue][property] = null;