« get me outta code hell

data, infra: only make exposed properties enumerable - 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>2023-08-30 16:32:40 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-05 21:02:54 -0300
commit1cf06b4898b517993a171a5f6c39d00609105253 (patch)
treedd646d2f6394a51795641a8dfd79eeb2e820997b /src/data
parentb38a3c787dc4fbec5e2dc0c297bbcd3ceae83349 (diff)
data, infra: only make exposed properties enumerable
This prevents them from being displayed in, for example, node-tap
mismatched test case output.

AFAIK, we generally don't depend on the enumerability of properties
anywhere in hsmusic's codebase, and it doesn't really make sense
for unexposed properties to be enumerable in the first place.
Diffstat (limited to 'src/data')
-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 24a6cf01..62c23d13 100644
--- a/src/data/things/cacheable-object.js
+++ b/src/data/things/cacheable-object.js
@@ -141,7 +141,7 @@ export default class CacheableObject {
 
       const definition = {
         configurable: false,
-        enumerable: true,
+        enumerable: flags.expose,
       };
 
       if (flags.update) {