Guard geometryBlobToPath against non-Uint8Array blobs
Return empty path if blob is missing or its buffer is not an ArrayBuffer, preventing DataView constructor crash during rendering.
This commit is contained in:
parent
7dbba7b2af
commit
829bafa698
|
|
@ -348,6 +348,7 @@ export function geometryBlobToPath(
|
|||
windingRule: WindingRule
|
||||
): Path {
|
||||
const path = new ck.Path()
|
||||
if (!blob || !(blob.buffer instanceof ArrayBuffer)) return path
|
||||
const dv = new DataView(blob.buffer, blob.byteOffset, blob.byteLength)
|
||||
let o = 0
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue