Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError #2

Closed
Impossiblue opened this issue Mar 30, 2021 · 3 comments
Closed

SyntaxError #2

Impossiblue opened this issue Mar 30, 2021 · 3 comments

Comments

@Impossiblue
Copy link

When I run the Scroll Story 'index.html' file (Path: os-data-hub-tutorials-master > web-development > scroll-story > code > index.html) I get an error message in Safari.

Quote start:

SyntaxError: Can't create duplicate variable that shadows a global property: 'map'

(anonymous function)

Quote end.

The only modification I did was to add my API key in 'tutorial.js'.

@johnx25bd
Copy link
Contributor

Hi @Impossiblue - thanks for raising this. We can't replicate it on our end - what version of Safari are you using?

We found this stackoverflow thread - seems like it could be an issue when the code selects an HTML element where the id matches the variable name.

So one idea would be to change the <div id="map"> element to another id in index.html, and the corresponding string on line 12 in tutorial.js. We just pushed a branch with these adjustments, try this out: 4882811

If that doesn't work, can you share more details like your OS version, Safari version etc and we can see if we can help resolve?

@Impossiblue
Copy link
Author

Impossiblue commented Apr 6, 2021 via email

@johnx25bd
Copy link
Contributor

Great, thanks Bjorn! Glad to hear the workaround was successful. I'm going to close this issue - if you have any more problems feel free to open a new one!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants