mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-03 08:32:52 +00:00
feat: inform user when backup is incompatible, resolves #34
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user