diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-09-07 09:38:26 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-07 09:38:26 -0300 |
commit | ff6d14354612a9da430d523fa9dbc237cae3a6e2 (patch) | |
tree | d0f360fad34edda292b5f372df7366105794bf16 | |
parent | c6ba294c4fef425074f2352b640cc02c4768ee6e (diff) |
infra, data: allow exporting non-classes from things/ files
-rw-r--r-- | src/data/things/index.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/data/things/index.js b/src/data/things/index.js index 591cdc3b..2d4f77d7 100644 --- a/src/data/things/index.js +++ b/src/data/things/index.js @@ -82,6 +82,8 @@ function errorDuplicateClassNames() { function flattenClassLists() { for (const classes of Object.values(allClassLists)) { for (const [name, constructor] of Object.entries(classes)) { + if (typeof constructor !== 'function') continue; + if (!(constructor.prototype instanceof Thing)) continue; allClasses[name] = constructor; } } |