fix: check if trs and action exist in doEventList
This commit is contained in:
parent
0c7e3d9d7e
commit
a2024a9827
|
@ -220,8 +220,10 @@ var TableHeader = function (_Component) {
|
|||
};
|
||||
|
||||
TableHeader.prototype.doEventList = function doEventList(trs, action) {
|
||||
for (var index = 0; index < trs.length; index++) {
|
||||
action(trs[index]);
|
||||
if (trs && Array.isArray(trs) && action) {
|
||||
for (var index = 0; index < trs.length; index++) {
|
||||
action(trs[index]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bee-table",
|
||||
"version": "2.3.15-beta.12",
|
||||
"version": "2.3.15-beta.13",
|
||||
"description": "Table ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
|
|
@ -171,8 +171,10 @@ class TableHeader extends Component {
|
|||
|
||||
|
||||
doEventList(trs,action){
|
||||
for (let index = 0; index < trs.length; index++) {
|
||||
action(trs[index]);
|
||||
if (trs && Array.isArray(trs) && action) {
|
||||
for (let index = 0; index < trs.length; index++) {
|
||||
action(trs[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue