Add check to avoid unbinding keys before binding takes place

This commit is contained in:
Buu Nguyen 2014-05-21 17:51:50 -07:00
parent dc34fd82c8
commit a14771aa63
1 changed files with 5 additions and 3 deletions

View File

@ -99,8 +99,8 @@
showHelpPopup()
$toggleBtn.show()
if (!keysBound) {
keysBound = true
key('⌘+b, ⌃+b', toggleSidebar)
keysBound = true
}
if (repoChanged || reload) {
@ -115,10 +115,12 @@
else {
toggleSidebar(false)
$toggleBtn.hide()
if (keysBound) {
key.unbind('⌘+b, ⌃+b')
keysBound = false
}
}
}
function selectTreeNode() {
var tree = $.jstree.reference($treeView)