From 56ac4b2fc1a7cd89d21fdb0578e7cdc052624246 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 11 Mar 2022 01:58:43 +0000 Subject: [PATCH] TableView: be more strict when checking the ui item index --- src/static/js/ui/TableView.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/static/js/ui/TableView.mjs b/src/static/js/ui/TableView.mjs index 7fab691..cda9be0 100644 --- a/src/static/js/ui/TableView.mjs +++ b/src/static/js/ui/TableView.mjs @@ -3,6 +3,7 @@ import Emel from 'emel'; import fa_emel from './forkawesome_emel.mjs'; +import AbstractUIItem from './AbstractUIItem.mjs'; import ui_item_index from './ui_item_index.mjs'; import tabledefs from '../tabledefs/index.mjs'; @@ -43,7 +44,7 @@ class TableView { el.classList.add("data-item"); el_dataitems.appendChild(el); - if(typeof ui_item_index[def.type] !== "undefined") { + if(ui_item_index[def.type] instanceof AbstractUIItem) { let item_manager = new ui_item_index[def.type](el, def); this.el_parts.set(def.name, item_manager); }