astoilkov/use-local-storage-state

Compiler target causing error in Edge (non-Chromium)

willviles opened this issue · 3 comments

Targeting ES2019 in your tsconfig.json compiler options causes problems when bundled into sites running Edge (non-Chromium).

This is because Edge still doesn't handle optional catch binding properly.

} catch { // syntax error

} catch (err) { // fine

Simply changing the compiler target from ES2019 to ES5 or ES6 should solve this.

"target": "ES2019",

Makes sense. I will do it. Thanks!

Sorry for the slow response.

I made the change and published a new release.

Thanks!