Skip to content

Commit

Permalink
Fix issues #88 and #89
Browse files Browse the repository at this point in the history
88: Check if @panel is null before using it

89: Return the disposable object from Config.observe so the
subscription add call can use it
  • Loading branch information
HebaruSan committed Nov 25, 2016
1 parent 1007370 commit 33e42dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/config.coffee
Expand Up @@ -134,6 +134,7 @@ class TermrkConfig
disposable = new CompositeDisposable
for k, fn of key
disposable.add atom.config.onDidChange(@prefix+k, fn)
return disposable
else
atom.config.onDidChange(@prefix+key, callback)

Expand Down
1 change: 1 addition & 0 deletions lib/termrk.coffee
Expand Up @@ -268,6 +268,7 @@ module.exports = Termrk =
callback?()

toggle: ->
return unless @panel?
if @panel.isVisible()
@hide()
else
Expand Down

0 comments on commit 33e42dc

Please sign in to comment.