Breaking error in Safari - SyntaxError: Unexpected token '*'

The realm-web package (1.2.1) is causing my web application to hang on load because of a generator inside the MongoDBCollection class. I’ve tested my app on Microsoft Edge, Firefox, and Chrome with no issues whatsoever. Please help me here.

The line of code that safari doesn’t like is below:

async *watch({ ids, filter, } = {}) {

}

Is there a way around this? Do I need to polyfill generators for safari using webpack or something. I’m kinda desperate here so any help will do. Thanks

Ok I believe I’ve found the issue. I was testing my web app on an older computer to find performance issues easier. The computer has Safari version 11.1.2 installed and I don’t believe realm-web works on that browser. I just tested it on my new Macbook pro and everything is fine. I will use polyfills to address this issue.

For anybody else seeing this error, update your browser :joy:

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.