# Dashboard-2 v1.21.0 release breaks existing Datastore behavior

**URL:** <https://discourse.nodered.org/t/dashboard-2-v1-21-0-release-breaks-existing-datastore-behavior/94096>\
**Category:** Developing Nodes\
**Tags:** dashboard-2\
**Created:** [21 December 2024 21:57 UTC](https://discourse.nodered.org/t/dashboard-2-v1-21-0-release-breaks-existing-datastore-behavior/94096 "2024-12-21T21:57:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [21 December 2024 21:57 UTC](https://discourse.nodered.org/t/dashboard-2-v1-21-0-release-breaks-existing-datastore-behavior/94096/1 "2024-12-21T21:57:01Z")

</div>

I have just upgraded to Dashboard-2 v1.21.0, and it seems to have changed the datastore behavior (from _replace_ to _merge_, as described in [#1465](https://github.com/FlowFuse/node-red-dashboard/pull/1465)). Also, when saving a string, the datastore now returns it as a buffer.

While the _merge_ option is a very welcome improvement, it breaks some of my existing ui-nodes, who store their latest data snapshot, and assume that `datastore.save` is replacing the previous snapshot. I have updated my nodes (to call a datastore `clear` before the save).

Just mentioning this as an FYI to dashboard-node developers who may encounter similar issues.

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [23 December 2024 09:28 UTC](https://discourse.nodered.org/t/dashboard-2-v1-21-0-release-breaks-existing-datastore-behavior/94096/2 "2024-12-23T09:28:41Z")

</div>

It should have been backward compatible, what was the issue caused by the change? Were you reliant upon previously sent properties being cleared on new messages coming in?

---

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [23 December 2024 10:50 UTC](https://discourse.nodered.org/t/dashboard-2-v1-21-0-release-breaks-existing-datastore-behavior/94096/3 "2024-12-23T10:50:19Z")

</div>

I am saving the current data snapshot of the node. After the datastore change, the new save adds new properties and updates existing ones correctly, but does not remove from the store properties which are no longer in the data.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 February 2025 10:51 UTC](https://discourse.nodered.org/t/dashboard-2-v1-21-0-release-breaks-existing-datastore-behavior/94096/4 "2025-02-21T10:51:01Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
