Skip to content

Commit

Permalink
Merge pull request #181 from paireks/experiment/stl
Browse files Browse the repository at this point in the history
[FIX] First argument to DataView constructor must be an ArrayBuffer
  • Loading branch information
xeolabs authored Nov 17, 2024
2 parents a7aca6b + d1cc024 commit 5c78e74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parsers/parseSTLIntoXKTModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ function ensureBinary(buffer) {
for (let i = 0; i < buffer.length; i++) {
arrayBuffer[i] = buffer.charCodeAt(i) & 0xff; // implicitly assumes little-endian
}
return arrayBuffer.buffer || arrayBuffer;
return arrayBuffer.buffer;
} else {
return buffer;
return buffer.buffer;
}
}

Expand Down

0 comments on commit 5c78e74

Please sign in to comment.