From 63b7f8ab18301f23b03ea946fe8ca7d33a3203bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Sat, 2 Dec 2023 21:03:14 +0100 Subject: [PATCH] feat: inform user when backup is incompatible, resolves #34 --- src/lib/backup/backup.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/backup/backup.ts b/src/lib/backup/backup.ts index 524bb193..4ba98eee 100644 --- a/src/lib/backup/backup.ts +++ b/src/lib/backup/backup.ts @@ -67,8 +67,10 @@ export function restoreFromFile( switch (file.type) { case "backup": { const recent = file.history[0] - if (recent[1].device !== get(serialPort)?.device) + if (recent[1].device !== get(serialPort)?.device) { + alert("Backup is incompatible with this device") throw new Error("Backup is incompatible with this device") + } changes.update(changes => { changes.push(