Bug 1217769 - aboutdebugging: default to addons tab without navigating if hash is empty;r=janx

MozReview-Commit-ID: 8hlFDqrpKit
This commit is contained in:
Julian Descottes
2016-04-27 14:07:19 +02:00
parent 98666e19a9
commit 5be36f386c

View File

@@ -59,7 +59,9 @@ module.exports = createClass({
},
onHashChange() {
let tabId = window.location.hash.substr(1);
let hash = window.location.hash;
// Default to defaultTabId if no hash is provided.
let tabId = hash ? hash.substr(1) : defaultTabId;
let isValid = tabs.some(t => t.id == tabId);
if (isValid) {