Skip to content

Commit

Permalink
Fixed the problem that when opening old ob format project files, an e…
Browse files Browse the repository at this point in the history
…rror message will be displayed if device is null
  • Loading branch information
zhengyangliu committed Dec 13, 2024
1 parent 28f1c79 commit 3bc2cff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/virtual-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ class VirtualMachine extends EventEmitter {
device.deviceId = projectJSON.device;
device.type = projectJSON.deviceType;
device.pnpIdList = projectJSON.pnpIdList;
} else if (typeof projectJSON.device === 'object') {
} else if (typeof projectJSON.device === 'object' && projectJSON.device !== null) {
device = projectJSON.device;
}

Expand Down

0 comments on commit 3bc2cff

Please sign in to comment.