Improves toggle method

This commit is contained in:
Filipa Lacerda 2017-09-25 12:39:16 +01:00
parent 84c4834fb4
commit 9c7807b319
No known key found for this signature in database
GPG key ID: 9CA3FDE4D1E2F1C8

View file

@ -51,11 +51,11 @@
}, },
toggleRepo() { toggleRepo() {
if (this.isOpen === false) { this.isOpen = !this.isOpen;
if (this.isOpen) {
this.fetchList({ repo: this.repo }) this.fetchList({ repo: this.repo })
.catch(() => this.showError(errorMessagesTypes.FETCH_REGISTRY)); .catch(() => this.showError(errorMessagesTypes.FETCH_REGISTRY));
} }
this.isOpen = !this.isOpen;
}, },
handleDeleteRepository() { handleDeleteRepository() {