'key of' is better than Object.keys
This commit is contained in:
parent
973ae06f21
commit
5e5ae81c53
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue