From 314f1add79aee9722745b7622f68cf07f9082ae5 Mon Sep 17 00:00:00 2001 From: Break27 Date: Wed, 12 Aug 2026 16:39:53 +0800 Subject: [PATCH] fix: promise chaining --- index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.html b/index.html index 9360973..9d89f52 100644 --- a/index.html +++ b/index.html @@ -426,8 +426,7 @@ while (await new Promise(o => setTimeout(o, 1000, true))) { if (save) try { $.all('#actions > button').forEach(e => e.disabled = true); var writable = await filehandle.createWritable({ mode: 'exclusive' }); - let buffer = await filehandle.getFile().then(f => f.arrayBuffer()); - let data = await Rpc2.invoke('merge', { params: [new Uint8Array(buffer).toBase64()] }); + let data = await filehandle.getFile().then(f => Rpc2.invoke('merge', { params: [new Uint8Array(f.arrayBuffer()).toBase64()] })); await writable.write(Uint8Array.fromBase64(data)); await writable.close(); await Rpc2.notify('close');