From 30d9ad76bd6716ee999476c124e2fc8840b49017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Tue, 20 Nov 2018 12:49:47 +0100 Subject: Fix getting current tab ID when there are no tabs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Calviño Sánchez --- js/views/tabview.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(); }, -- cgit v1.2.3