mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-21 01:12:59 +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) {
|
switch (file.type) {
|
||||||
case "backup": {
|
case "backup": {
|
||||||
const recent = file.history[0]
|
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")
|
throw new Error("Backup is incompatible with this device")
|
||||||
|
}
|
||||||
|
|
||||||
changes.update(changes => {
|
changes.update(changes => {
|
||||||
changes.push(
|
changes.push(
|
||||||
|
|||||||
Reference in New Issue
Block a user