Assume that Object.assign is present in the "mobile" environment.

Summary: Pull Request resolved: https://github.com/facebook/prepack/pull/2313

Differential Revision: D8958641

Pulled By: simonhj

fbshipit-source-id: d5ff109f5a68eda818770a56196091b162db8610
This commit is contained in:
Simon Jensen 2018-07-23 15:15:03 -07:00 committed by Facebook Github Bot
parent 7480608e79
commit 5f3d54775f

View File

@ -234,7 +234,7 @@ export default function(realm: Realm): NativeFunctionValue {
});
// ECMA262 19.1.2.1
if (!realm.isCompatibleWith(realm.MOBILE_JSC_VERSION) && !realm.isCompatibleWith("mobile")) {
if (!realm.isCompatibleWith(realm.MOBILE_JSC_VERSION)) {
func.defineNativeMethod("assign", 2, (context, [target, ...sources]) => {
// 1. Let to be ? ToObject(target).
let to = To.ToObject(realm, target);