Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[web] Use defer instead of async (#197)
Sometimes the web repl will fail with this error message in the console: ``` Uncaught (in promise) TypeError: rinkDiv is null Immutable 2 pushError <anonymous> index.1d6d65d8.js:111:3 ``` To reproduce in Firefox, ctrl+click on a link to `rinkcalc.app`, such as [this one](https://rinkcalc.app/?q=(c/sqrt(4.5))/2.4GHz/20). Seems like it's caused by a race condition. The script is in the `<head>` element and is marked `async`. Async scripts apparently run in parallel to parsing the page. Changing this to `defer` fixes it for me.
- Loading branch information