Skip to content

Commit

Permalink
Add exception handler to filter out winit control flow message (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
marlyx authored May 29, 2023
1 parent a74d012 commit 34d8121
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wasm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
<script type="module">
import './restart-audio-context.js'
import init from './bevy_game.js'
init()

init().catch((error) => {
if (!error.message.startsWith("Using exceptions for control flow, don't mind me. This isn't actually an error!")) {
throw error;
}
});
</script>
</body>

Expand Down

0 comments on commit 34d8121

Please sign in to comment.