es5-shim: Conflict ES5-shim(sham) 4.5.15 and ES6-shim(sham) 0.35.x

The recently released version of es5-shim 4.5.15 confirmed a conflict with es6-shim 0.35.x. It seems to be a new problem that did not occur in 4.5.14.

es5-shim(+sham) es6-shim(+sham) Is it works?
4.5.14 0.35.5 it works
4.5.14 0.35.6 it works
4.5.15 0.35.5 does not work
4.5.15 0.35.6 does not work

I’m going to take a closer look at what the difference is soon.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Modifying es6-shim to match the changes in es5-shim(sham) corrected the error. Please check if it is a valid solution.

The exact point of failure is that there is a variable called object marked undefined. This depends on whether it is == or === as shown in 64b444ebddd81ccf04c86a8aed21fe754acc829b.

  • es5-sham.js:L70
if (proto || proto == null) { // `undefined` is for pre-proto browsers    // <--- allow 'undefined' object
// if (proto || proto === null) //  <--- disallow 'undefined' object
  • es6-shim.js:L72
if (!force && name in object) { return; }    // <--- error and break (because `object' is `undefined`)

If I can see the stack trace, I will write it soon.