Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fiqare secmotic rules #411

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Rule 4: if.. else if constructs should end with else clauses
fiqare-secmotic committed Dec 16, 2019
commit 85f7388cbcb83f4dd1b8a7e50c3e06e407eb7199
2 changes: 2 additions & 0 deletions lib/iotaUtils.js
Original file line number Diff line number Diff line change
@@ -154,6 +154,8 @@ function mergeDeviceWithConfiguration(deviceData, configuration, callback) {
deviceData[fields[i]] = configuration[confField];
} else if (!deviceData[fields[i]] && (!configuration || !configuration[confField])) {
deviceData[fields[i]] = defaults[i];
} else {
config.getLogger().error(context, 'There is no possible merge');
fiqare-secmotic marked this conversation as resolved.
Show resolved Hide resolved
}

if (deviceData[fields[i]] && ['active', 'lazy', 'commands'].indexOf(fields[i]) >= 0) {