From: Cheng Zhao Date: Fri, 4 Dec 2015 03:40:35 +0000 (+0800) Subject: 'key of' is better than Object.keys X-Git-Tag: v0.35.3~1^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=5e5ae81c536948d4bd39fe78de26880dea3e46cb;p=electron.git 'key of' is better than Object.keys --- diff --git a/atom/browser/lib/guest-window-manager.coffee b/atom/browser/lib/guest-window-manager.coffee index eea26462..53bbb735 100644 --- a/atom/browser/lib/guest-window-manager.coffee +++ b/atom/browser/lib/guest-window-manager.coffee @@ -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