Skip to content

Commit

Permalink
Merge pull request #500 from FlowFuse/498-ui-chart-not-replacing
Browse files Browse the repository at this point in the history
UI Chart - Ensure server-side store also replaces if "replace" action is chosen
  • Loading branch information
joepavitt authored Jan 19, 2024
2 parents e640982 + ad021f7 commit 93cc808
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nodes/widgets/ui_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ module.exports = function (RED) {
// clear history
datastore.save(base, node, [])
} else {
if (config.action === 'replace') {
// clear our data store as we are replacing data
datastore.save(base, node, [])
}
if (!Array.isArray(msg.payload)) {
// quick clone of msg, and store in history
datastore.append(base, node, {
Expand Down

0 comments on commit 93cc808

Please sign in to comment.