summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/js/examples/tinywasm/delete_fetch.mjs
blob: 7aebb7d79c0276e2007b801595c4f78da0e4997b (plain)
1
2
3
4
5
6
7
8
// This file is part of ICU4X. For terms of use, please see the file
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).

// diplomat-wasm.mjs uses fetch when available, but fetch in Node.js is broken,
// so delete the function to force the wasm to be loaded via the fs module.
// See <https://github.com/rust-diplomat/diplomat/issues/283>.
delete globalThis.fetch;