table element

This commit is contained in:
2026-02-07 23:47:59 +01:00
parent fbcde37d95
commit 937b05c362
2 changed files with 5 additions and 5 deletions

View File

@@ -145,13 +145,13 @@
domc.addType('bridge-table', {
model: BaseModel.extend({
initialize(props = {}, opts = {}) {
if (BaseModel.prototype.initialize) {
BaseModel.prototype.initialize.apply(this, [props, opts]);
}
// Guard: grapes may not have classes as array/collection yet
// Guard before base init: grapes expects classes to be iterable in getAttributes
if (!this.classes || typeof this.classes.forEach !== 'function') {
this.classes = [];
}
if (BaseModel.prototype.initialize) {
BaseModel.prototype.initialize.apply(this, [props, opts]);
}
const attrs = this.getAttributes ? this.getAttributes() : {};
const nextAttrs = Object.assign({
'data-bridge-table': '1',