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