diff --git a/index.html b/index.html index 8fea1bb..be4fd42 100644 --- a/index.html +++ b/index.html @@ -426,7 +426,8 @@ while (await new Promise(o => setTimeout(o, 1000, true))) { if (save) try { $.all('#actions > button').forEach(e => e.disabled = true); let writable = await filehandle.createWritable({ mode: 'exclusive' }); - let data = await filehandle.getFile().arrayBuffer().then(b => Rpc2.invoke('merge', { params: [new Uint8Array(b).toBase64()] })); + let buffer = await filehandle.getFile().then(f => f.arrayBuffer()); + let data = await Rpc2.invoke('merge', { params: [new Uint8Array(buffer).toBase64()] }); await writable.write(Uint8Array.fromBase64(data)); await writable.close(); await Rpc2.notify('close');