Closed hamishwillee closed 3 months ago
Hi @bsmth, I'm not as familiar with WASM memory. Since you've recently reviewed similar content and examples, could you help by taking a look at this PR as well? Thanks!
This is actually a JavaScript async issue really. It makes no sense to await on a promise when you're going to handle the result in a then
. Either you await and handle the result in the next line, or you don't await and you handle in a then
call. Not both.
Congratulations on your first merged pull request. 🎉 Thank you for your contribution! Did you know we have a project board with high-impact contribution opportunities? We look forward to your next contribution.
This fixes two WASM examples for working for memory.
Specifically these are JavaScript files that use
await
to wait on a returned promise, but then chain off the result usingthen
- there is no point doing both, so this removes the "then" and makes it await properly.There are probably similar examples, but these are the ones I'm looking at for https://github.com/mdn/content/issues/32777