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:
Thomas Brouard 2018-08-08 10:57:02 +02:00 committed by GitHub
commit 3bbd4b8270
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,11 +101,11 @@ class TabGroup extends EventEmitter {
}
getTabs () {
return this.tabs;
return this.slice().tabs;
}
eachTab (fn) {
this.tabs.forEach(fn);
this.tabs.slice().forEach(fn);
return this;
}