summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();
},