Skip to content

Commit

Permalink
Avoid calling Object.assign before polyfill is installed. (#17544)
Browse files Browse the repository at this point in the history
  • Loading branch information
William Chou authored and rsimha committed Aug 16, 2018
1 parent 6324fa4 commit beb8e50
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/polyfills.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ import {installCustomElements as installRegisterElement} from
'document-register-element/build/document-register-element.patched';
import {isExperimentOn} from './experiments';

if (isExperimentOn(self, 'custom-elements-v1') || getMode().test) {
installCustomElements(self, class {});
} else {
installRegisterElement(self, 'auto');
}
installDOMTokenListToggle(self);
installMathSign(self);
installObjectAssign(self);
installPromise(self);
installDocContains(self);
installArrayIncludes(self);
// isExperimentOn() must be called after Object.assign polyfill is installed.
if (isExperimentOn(self, 'custom-elements-v1') || getMode().test) {
installCustomElements(self, class {});
} else {
installRegisterElement(self, 'auto');
}

0 comments on commit beb8e50

Please sign in to comment.