diff --git a/Sources/IO/Geometry/DracoReader/index.js b/Sources/IO/Geometry/DracoReader/index.js index 9cb2dad1e8e..5d221bafd97 100644 --- a/Sources/IO/Geometry/DracoReader/index.js +++ b/Sources/IO/Geometry/DracoReader/index.js @@ -36,8 +36,14 @@ function setWasmBinary(url, binaryName) { xhr.onload = () => { if (xhr.status === 200) { dracoDecoderType.wasmBinary = xhr.response; - decoderModule = window.DracoDecoderModule(dracoDecoderType); - resolve(true); + // Use Promise.resolve to be compatible with versions before Draco 1.4.0 + Promise.resolve(window.DracoDecoderModule(dracoDecoderType)).then( + (module) => { + decoderModule = module; + resolve(true); + }, + reject + ); } else { reject(Error(`WASM binary could not be loaded: ${xhr.statusText}`)); }