« get me outta code hell

fix erroring for only one property at a time - 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>2022-02-01 16:20:58 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-02-01 16:20:58 -0400
commite64d210cf0a798ae99bec89ca37cffcc1599411d (patch)
tree316985b94718d1693505834c5193c5d945abdab8
parentf6cd5a19f3171e1a4117aa47559df22d8bbb1de9 (diff)
fix erroring for only one property at a time
-rwxr-xr-xsrc/upd8.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 001aaa5..9c86c26 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -808,9 +808,7 @@ function makeProcessDocument(thingClass, {
 
         withAggregate({message: `Errors applying ${color.green(thingClass.name)} properties`}, ({ call }) => {
             for (const [ property, value ] of Object.entries(sourceProperties)) {
-                (() => {
-                    thing[property] = value;
-                })();
+                call(() => (thing[property] = value));
             }
         });