mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 02:08:38 +09:00
Fix order of OwnProperty check for rest parameters.
This was a small mistake when converting from the `hasOwn()` function format (swapped parameters). Fixing this properly makes rest parameters exclude the parameters that are defined (which is the whole point of `...rest`
This commit is contained in:
parent
5e6128d0a5
commit
41efc528d5
1 changed files with 1 additions and 1 deletions
|
|
@ -254,7 +254,7 @@ function CopyDataProperties(target, source, excluded) {
|
||||||
|
|
||||||
// We abbreviate this by calling propertyIsEnumerable which is faster
|
// We abbreviate this by calling propertyIsEnumerable which is faster
|
||||||
// and returns false for not defined properties.
|
// and returns false for not defined properties.
|
||||||
if (!callFunction(std_Object_hasOwnProperty, key, excluded) && callFunction(std_Object_propertyIsEnumerable, source, key))
|
if (!callFunction(std_Object_hasOwnProperty, excluded, key) && callFunction(std_Object_propertyIsEnumerable, source, key))
|
||||||
_DefineDataProperty(target, key, source[key]);
|
_DefineDataProperty(target, key, source[key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue