« get me outta code hell

data: CacheableObject: don't compute old value when validation fails - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-01-06 09:02:21 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-06 09:02:21 -0400
commit5415182c9944a995f84ba644e91196e554665aec (patch)
treef91ac886ca0d1fb0c414fec6bfaa99b8d9a7c1a8 /src
parent54412ec68e2b8014f37fd7d4135e2e3db8d2835c (diff)
data: CacheableObject: don't compute old value when validation fails
Diffstat (limited to 'src')
-rw-r--r--src/data/things/cacheable-object.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data/things/cacheable-object.js b/src/data/things/cacheable-object.js
index 9fda865e..a8610fad 100644
--- a/src/data/things/cacheable-object.js
+++ b/src/data/things/cacheable-object.js
@@ -180,7 +180,7 @@ export default class CacheableObject {
             throw new TypeError(`Validation failed for value ${newValue}`);
           }
         } catch (caughtError) {
-          throw new CacheableObjectPropertyValueError(property, this[property], newValue, caughtError);
+          throw new CacheableObjectPropertyValueError(property, oldValue, newValue, caughtError);
         }
       }