Skip to content

Commit

Permalink
add ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
LDannijs committed Aug 26, 2024
1 parent 8080bfb commit 543bc1a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vendor/dragino/lsn50-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function normalizeUplink(input) {
},
],
action: {
contactState: input.data.Door_status
contactState: input.data.Door_status ? "OPEN":"CLOSED"
},
battery: input.data.BatV,
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/dragino/lsn50v2-s31.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function normalizeUplink(input) {
},
],
action: {
contactState: input.data.Door_status
contactState: input.data.Door_status ? "OPEN":"CLOSED"
},
battery: input.data.BatV,
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/milesight-iot/ws301.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function normalizeUplink(input) {
return {
data: {
action: {
contactState: input.data.door.toUpperCase()
contactState: input.data.door ? "OPEN":"CLOSED"
},
battery: input.data.battery,
}
Expand Down

0 comments on commit 543bc1a

Please sign in to comment.