From 65fdf0240b6af9fb09a159bbe5d3d99acadac21a Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 8 Aug 2016 13:50:49 +0100 Subject: [PATCH] Add Object.assign() polyfill (#399) --- config/polyfills.js | 4 ++++ package.json | 1 + 2 files changed, 5 insertions(+) diff --git a/config/polyfills.js b/config/polyfills.js index 1f71e4ac4f..7e601502b2 100644 --- a/config/polyfills.js +++ b/config/polyfills.js @@ -8,3 +8,7 @@ if (typeof Promise === 'undefined') { // fetch() polyfill for making API calls. require('whatwg-fetch'); + +// Object.assign() is commonly used with React. +// It will use the native implementation if it's present and isn't buggy. +Object.assign = require('object-assign'); diff --git a/package.json b/package.json index 7aabcf1372..845f15e41f 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "http-proxy-middleware": "0.17.0", "jest": "14.1.0", "json-loader": "0.5.4", + "object-assign": "4.1.0", "opn": "4.0.2", "path-exists": "3.0.0", "postcss-loader": "0.9.1",