feat: inform user when backup is incompatible, resolves #34

This commit is contained in:
2023-12-02 21:03:14 +01:00
parent eaf8028538
commit 63b7f8ab18

View File

@@ -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(