bugfix #46 dupe device loading

This commit is contained in:
sparks-alec
2023-01-08 21:47:15 -05:00
parent a54298dc88
commit e5cba677db
4 changed files with 84 additions and 54 deletions
+9 -6
View File
@@ -95,12 +95,15 @@ window.init = function init() {
};
document.getElementById('add-device-button').onchange = function addDeviceClick(e) {
DEVICE.registerDevice({
type: e.target.value,
defaultName: 'New Device',
port: undefined,
addresses: [],
});
DEVICE.registerDevice(
{
type: e.target.value,
defaultName: 'New Device',
port: undefined,
addresses: [],
},
'fromAddButton'
);
e.target.selectedIndex = 0;
SAVESLOTS.saveAll();