diff --git a/build/TableHeader.js b/build/TableHeader.js index 4d6f907..387cf48 100644 --- a/build/TableHeader.js +++ b/build/TableHeader.js @@ -262,9 +262,11 @@ var TableHeader = function (_Component) { var events = [{ key: 'mouseup', fun: this.onTrMouseUp }, { key: 'mousemove', fun: this.onTrMouseMove }]; // this.eventListen(events,'remove',this.table.tr[0]); - this.doEventList(this.table.tr, function (tr) { - _this5.eventListen(events, 'remove', _this5.table.tr); - }); + if (this.table && this.table.tr) { + this.doEventList(this.table.tr, function (tr) { + _this5.eventListen(events, 'remove', _this5.table.tr); + }); + } }; TableHeader.prototype.eventListen = function eventListen(events, type, eventSource) { diff --git a/package.json b/package.json index 6bcb255..aaee0fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bee-table", - "version": "2.3.15-beta.20", + "version": "2.3.15-beta.21", "description": "Table ui component for react", "keywords": [ "react", diff --git a/src/TableHeader.js b/src/TableHeader.js index 5be16fc..4719b55 100644 --- a/src/TableHeader.js +++ b/src/TableHeader.js @@ -210,9 +210,11 @@ class TableHeader extends Component { {key:'mousemove', fun:this.onTrMouseMove}, ]; // this.eventListen(events,'remove',this.table.tr[0]); - this.doEventList(this.table.tr,(tr)=>{ - this.eventListen(events,'remove',this.table.tr); - }) + if(this.table && this.table.tr){ + this.doEventList(this.table.tr,(tr)=>{ + this.eventListen(events,'remove',this.table.tr); + }) + } } eventListen(events,type,eventSource){