Skip to content

Commit 81eb168

Browse files
authored
fix: send-path-value ignores the entered path (#41)
1 parent 2419af5 commit 81eb168

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

signalk-send-pathvalue.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ module.exports = function(RED) {
1313
}
1414

1515
node.on('input', msg => {
16-
if ( !msg.topic ) {
17-
node.error('no topic for incomming message')
16+
let path = config.path ? config.path : msg.topic
17+
18+
if ( !path ) {
19+
node.error('no topic or path configured')
1820
return
1921
}
2022

21-
let path = config.path ? config.path : msg.topic
22-
2323
if ( typeof config.meta !== 'undefined' && config.meta !== "" && !sentMeta[path] ) {
2424
let delta = {
2525
updates: [

0 commit comments

Comments
 (0)