TableView: be more strict when checking the ui item index

This commit is contained in:
Starbeamrainbowlabs 2022-03-11 01:58:43 +00:00
parent 71f8497bee
commit 56ac4b2fc1
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -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);
}