Skip to content

Commit

Permalink
Merge branch 'master' into focalpoint-as-center
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain authored Jun 22, 2021
2 parents d266819 + 00960d0 commit 85948ba
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Sources/IO/Geometry/DracoReader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`));
}
Expand Down

0 comments on commit 85948ba

Please sign in to comment.