Skip to content

[bug] [safari] Causes a let declaration Syntax Error in Safari. #681

@trusktr

Description

@trusktr

Oddly, this error doesn't happen in Chrome, only in Safari.

Input Code

Here's the non-minified code:

https://cdn.rawgit.com/trusktr/3248affba4a01a7ebf15f3cb0e68f18c/raw/b6b8258ced55798113d852c5b457f0df3bd033c5/not-minified.js

Actual Output

Here's the minified code:

https://cdn.rawgit.com/trusktr/3248affba4a01a7ebf15f3cb0e68f18c/raw/b6b8258ced55798113d852c5b457f0df3bd033c5/minified.js

Expected Output

It should work, not sure what the output should be. Here's the gist containing both files: https://gist.github.com/trusktr/3248affba4a01a7ebf15f3cb0e68f18c

Details

The following codepen uses the non-minified version. It works in Safari, you'll see a spinning square:
https://codepen.io/anon/pen/rzQmpK?editors=0010

The following pen is exactly the same, but it is using the minified version:
https://codepen.io/anon/pen/EvOmJM?editors=0010

In Safari, you will see errors with the minified version, that look like this:

screen shot 2017-08-29 at 11 12 18 am

If you run both of those pens in Chrome, they work fine. Only the non-minified pen works in Safari.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs infoThe details mentioned are NOT clear or NOT enough. Please provide more information.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions