Skip to content

Commit

Permalink
fix: prevent empty node object to break import
Browse files Browse the repository at this point in the history
Fixes #156
  • Loading branch information
robertsLando committed Jan 7, 2021
1 parent aea9308 commit 0bf9b12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ app.post('/api/importConfig', async function (req, res) {
for (let i = 0; i < config.length; i++) {
const e = config[i]
if (e && (!hasProperty(e, 'name') || !hasProperty(e, 'loc'))) {
throw Error('Configuration not valid')
continue
} else if (e) {
await gw.zwave.callApi('_setNodeName', i, e.name || '')
await gw.zwave.callApi('_setNodeLocation', i, e.loc || '')
Expand Down

0 comments on commit 0bf9b12

Please sign in to comment.