From 5415182c9944a995f84ba644e91196e554665aec Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 6 Jan 2024 09:02:21 -0400 Subject: data: CacheableObject: don't compute old value when validation fails --- src/data/things/cacheable-object.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); } } -- cgit 1.3.0-6-gf8a5