From ff6d14354612a9da430d523fa9dbc237cae3a6e2 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 7 Sep 2023 09:38:26 -0300 Subject: infra, data: allow exporting non-classes from things/ files --- src/data/things/index.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/data/things/index.js') 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; } } -- cgit 1.3.0-6-gf8a5