Skip to content

Commit

Permalink
Simplify $jscomp.setPrototypeOf when $jscomp.ASSUME_ES6 is true
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 708352898
  • Loading branch information
concavelenz authored and lauraharker committed Dec 20, 2024
1 parent 6fbe2aa commit d89c439
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ $jscomp.underscoreProtoCanBeSet = function() {
*
* @type {null|function(!Object, ?Object): !Object}
*/
$jscomp.setPrototypeOf = ($jscomp.TRUST_ES6_POLYFILLS &&
typeof Object.setPrototypeOf == 'function') ?
$jscomp.setPrototypeOf = ($jscomp.ASSUME_ES6 || ($jscomp.TRUST_ES6_POLYFILLS &&
typeof Object.setPrototypeOf == 'function')) ?
Object.setPrototypeOf :
$jscomp.underscoreProtoCanBeSet() ? function(target, proto) {
target.__proto__ = proto;
Expand Down

0 comments on commit d89c439

Please sign in to comment.