Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Uncaught SyntaxError: Unexpected token . #2

Closed
benjaminniess opened this issue Apr 9, 2021 · 3 comments
Closed

Uncaught SyntaxError: Unexpected token . #2

benjaminniess opened this issue Apr 9, 2021 · 3 comments

Comments

@benjaminniess
Copy link

Hello there,

Lovely idea you had! I was hopping to try the demos but I fugured out you've added an extra "?" here https://github.com/replit/kaboom/blob/master/src/kaboom.js#L2940

Thanks for your work I'll give it a go soon!

@rish
Copy link
Contributor

rish commented Apr 9, 2021

I think you are referring to optional chaining:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining

@slmjkdbtl
Copy link
Contributor

Hi!

Is it breaking? Seems like it's supported in all browsers starting 2020 so I just used it, but I'm thinking about introducing a build system and typescript to kaboom with esbuild and might get that polyfilled.

@benjaminniess
Copy link
Author

Hi,

I was ignoring this syntax and yes, it seems to be supported by all updated browsers. With the latest version of chrome it's now fine but yes I was getting a white page with this error in the console and just removing the "?" solved everything so it's up to you if you want to leave it or not.

Thanks to both of you

@slmjkdbtl slmjkdbtl added the ask label Apr 15, 2021
slmjkdbtl added a commit that referenced this issue Mar 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants