'key of' is better than Object.keys
authorCheng Zhao <zcbenz@gmail.com>
Fri, 4 Dec 2015 03:40:35 +0000 (11:40 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 4 Dec 2015 03:40:35 +0000 (11:40 +0800)
atom/browser/lib/guest-window-manager.coffee

index eea2646..53bbb73 100644 (file)
@@ -5,7 +5,7 @@ frameToGuest = {}
 
 # Copy attribute of |parent| to |child| if it is not defined in |child|.
 mergeOptions = (child, parent) ->
-  for own key, value of parent when key not in Object.keys child
+  for own key, value of parent when key not of child
     if typeof value is 'object'
       child[key] = mergeOptions {}, value
     else