From 2500a00e214801ceccc5301fc2f0234315476802 Mon Sep 17 00:00:00 2001 From: trafficlunar Date: Fri, 10 Jan 2025 21:06:54 +0000 Subject: [PATCH] fix: replace `file.bytes()` with `file.arrayBuffer()` --- .github/workflows/ntfy.yaml | 6 +++--- src/components/dialogs/OpenSchematic.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ntfy.yaml b/.github/workflows/ntfy.yaml index 32d99b2..ab21dfb 100644 --- a/.github/workflows/ntfy.yaml +++ b/.github/workflows/ntfy.yaml @@ -3,11 +3,11 @@ on: [deployment_status] jobs: notify: - if: github.event.deployment_status.state == "failure" | github.event.deployment_status.state == "success" + if: github.event.deployment_status.state == 'failure' | github.event.deployment_status.state == 'success' runs-on: ubuntu-latest steps: - name: Notify on Success - if: github.event.deployment_status.state == "success" + if: github.event.deployment_status.state == 'success' run: | curl \ -H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \ @@ -18,7 +18,7 @@ jobs: ${{ secrets.NTFY_URL }} - name: Notify on Failure - if: github.event.deployment_status.state == "failure" + if: github.event.deployment_status.state == 'failure' run: | curl \ -H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \ diff --git a/src/components/dialogs/OpenSchematic.tsx b/src/components/dialogs/OpenSchematic.tsx index 3f0b69b..0744915 100644 --- a/src/components/dialogs/OpenSchematic.tsx +++ b/src/components/dialogs/OpenSchematic.tsx @@ -46,7 +46,7 @@ function OpenSchematic({ close }: DialogProps) { await new Promise((resolve) => setTimeout(resolve, 100)); const fileExtension = file.name.split(".").pop(); - const bytes = await file.bytes(); + const bytes = await file.arrayBuffer(); const data = await nbt.read(bytes); if (fileExtension == "litematic") {