]> khamidou — GitHub mirrors - electron.git/commitdiff
'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 eea26462b68d61ebbdbfa16f4fe0cbda1ff0883e..53bbb735b044ff2a830850f700117f269bd9d872 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