summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2018-11-20 13:07:49 +0100
committerGitHub <noreply@github.com>2018-11-20 13:07:49 +0100
commit535f048ce507ca5e5612793133f5d38f35de25b6 (patch)
tree6fdee5c5fc4be3f813c87d008c176bdbdd3ec568
parent42dadd8717224ded81e4d4ab180ac94155eaf342 (diff)
parent30d9ad76bd6716ee999476c124e2fc8840b49017 (diff)
Merge pull request #1304 from nextcloud/fix-getting-current-tab-id-when-there-are-no-tabs
Fix getting current tab ID when there are no tabs
-rw-r--r--js/views/tabview.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/views/tabview.js b/js/views/tabview.js
index cea087b0c..fe9010cd6 100644
--- a/js/views/tabview.js
+++ b/js/views/tabview.js
@@ -337,9 +337,14 @@
/**
* Returns the ID of the currently selected tab.
*
- * @return {string} the ID of the currently selected tab.
+ * @return {string} the ID of the currently selected tab, or an empty
+ * string if there is none.
*/
getCurrentTabId: function() {
+ if (this._tabHeadersView === null) {
+ return '';
+ }
+
return this._tabHeadersView.getCurrentTabId();
},