Fix order of OwnProperty check for rest parameters.

This commit is contained in:
Fedor 2019-09-05 20:07:24 +03:00
parent 12ab86e3f5
commit 7cd52f3f78

View File

@ -254,7 +254,7 @@ function CopyDataProperties(target, source, excluded) {
// We abbreviate this by calling propertyIsEnumerable which is faster
// 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]);
}