Doesn't crash on empty key bindings.

This commit is contained in:
Corey Johnson
2011-12-12 10:21:13 -08:00
parent 607149a07d
commit 3d22a691f6

View File

@@ -21,7 +21,7 @@ class KeyBinder
# Watcher.watch path, =>
# @load path
json = CoffeeScript.eval "return " + (fs.read path)
json = (CoffeeScript.eval "return " + (fs.read path)) or {}
# Iterate in reverse order scopes are declared.
# Scope at the top of the file is checked last.
for name in _.keys(json).reverse()