Merge pull request #65 from maxosprojects/bugfix-58-return-and-iterate-only-copy-of-collection
Use this.tabs.slice() avoid broken tab collections (fixes #58)
This commit is contained in:
commit
3bbd4b8270
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
@ -101,11 +101,11 @@ class TabGroup extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
getTabs () {
|
getTabs () {
|
||||||
return this.tabs;
|
return this.slice().tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
eachTab (fn) {
|
eachTab (fn) {
|
||||||
this.tabs.forEach(fn);
|
this.tabs.slice().forEach(fn);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue