Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Commit

Permalink
Require ES5 compilation for Edge < 40.
Browse files Browse the repository at this point in the history
Fixes #161. Versions before 40 have a JIT bug where a constructor can
return the class instead of an instance.

See chakra-core/ChakraCore#2532 and
chakra-core/ChakraCore#2532.

Tested with http://jsfiddle.net/0k59gbL8/5/. Fails on 38, passes on 40.
  • Loading branch information
aomarks committed Apr 11, 2017
1 parent 1814569 commit a144418
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
* When directory paths don't end in `/`, redirect to the right path, not a
filesystem path. https://github.com/Polymer/polyserve/issues/96
* Require ES5 compilation for Edge < 40 (fixes #161).

## [0.16.0](https://github.com/PolymerLabs/polyserve/tree/v0.16.0) (2017-02-14)

Expand Down
2 changes: 1 addition & 1 deletion src/compile-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function needCompilation(uaParser: UAParser): boolean {
const supportsES2015 = (browser.name === 'Chrome' && majorVersion >= 49) ||
(browser.name === 'Chromium' && majorVersion >= 49) ||
(browser.name === 'Safari' && majorVersion >= 10) ||
(browser.name === 'Edge' && majorVersion >= 14) ||
(browser.name === 'Edge' && majorVersion >= 40) ||
(browser.name === 'Firefox' && majorVersion >= 51);
return !supportsES2015;
}

0 comments on commit a144418

Please sign in to comment.