1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-10 11:35:52 +01:00

fix decoding imported data from backend (#722)

This commit is contained in:
David Luzar 2020-02-06 18:46:26 +01:00 committed by GitHub
parent 33016bf6bf
commit 3b20e6e2b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -252,8 +252,7 @@ export async function importFromBackend(
buffer,
);
// We need to convert the decrypted array buffer to a string
const string = String.fromCharCode.apply(
null,
const string = new window.TextDecoder("utf-8").decode(
new Uint8Array(decrypted) as any,
);
data = JSON.parse(string);