@@ -145,17 +145,17 @@ module.exports = function(RED) {
145
145
146
146
function addPreviousValue ( node , msg , previousValue ) {
147
147
if ( node . outputPreviousValue ) {
148
- RED . util . setMessageProperty ( msg , node . outputPreviousValueMsgProperty , previousValue ) ;
148
+ RED . util . setMessageProperty ( msg , node . outputPreviousValueMsgProperty , previousValue , true ) ;
149
149
}
150
150
}
151
151
152
152
function updateCollectedValues ( node , msg , currentValue , previousValue ) {
153
153
if ( node . collectValues ) {
154
154
let collectedValues = RED . util . getMessageProperty ( msg , node . collectValuesMsgProperty ) ;
155
155
if ( ( collectedValues === undefined ) || ( typeof collectedValues !== 'object' ) ) {
156
- RED . util . setMessageProperty ( msg , node . collectValuesMsgProperty , { } ) ;
156
+ RED . util . setMessageProperty ( msg , node . collectValuesMsgProperty , { } , true ) ;
157
+ collectedValues = RED . util . getMessageProperty ( msg , node . collectValuesMsgProperty ) ;
157
158
}
158
- collectedValues = RED . util . getMessageProperty ( msg , node . collectValuesMsgProperty ) ;
159
159
160
160
const contextKey = getContextKey ( node ) ;
161
161
if ( node . outputPreviousValue ) {
@@ -363,7 +363,7 @@ module.exports = function(RED) {
363
363
const command = determineCommand ( node , msg ) ;
364
364
if ( command === kCommandRead ) {
365
365
// ---- Command: Read ----
366
- RED . util . setMessageProperty ( msg , node . msgProperty , currentValue ) ;
366
+ RED . util . setMessageProperty ( msg , node . msgProperty , currentValue , true ) ;
367
367
updateCollectedValues ( node , msg , currentValue ) ;
368
368
} else if ( command === kCommandWrite ) {
369
369
// ---- Command: Write ----
0 commit comments