Skip to content

Commit c43c524

Browse files
committed
Fix a typing issue using ArrayBuffer.detached
1 parent 66bb938 commit c43c524

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/gitbook/src/routes/icon.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export async function serveIcon(context: GitBookSiteContext, req: Request) {
5858
const dst = new ArrayBuffer(fontOrigin.byteLength);
5959
new Uint8Array(dst).set(new Uint8Array(fontOrigin));
6060

61-
if (dst.detached) {
61+
if (('detached' in dst && dst.detached) || dst.byteLength === 0) {
6262
console.log('about to use detached font buffer..');
6363
}
6464

0 commit comments

Comments
 (0)