steemit / smt-wizard

A web based Smart Media Token (SMT) creation wizard.
MIT License
2 stars 9 forks source link

SyntaxError in script.js line 21 #27

Closed kekkyojin closed 4 years ago

kekkyojin commented 4 years ago

While trying to see why Wizard wasn't working for some Steem users, I found an error on the DevTools console:

Uncaught SyntaxError: Unexpected identifier

As per MDN documentation on the async keyword:

The await keyword is only valid inside async functions. If you use it outside of an async function's body, you will get a SyntaxError.

The function where await keyword is used in not an async one, so an error is generated and wizard stops executing the script.

When copy-and-pasting the script.js code on JSBin and removing the "await" keyword, the error showed from JSHint about asyncGetChainID is removed.

Related commit: https://github.com/steemit/smt-wizard/commit/642e13a72c8c14d125d6ab7225b10233ca4dd147

Related (already merged) issue: #14