# Node-RED 0.20.0-beta.2 released

**URL:** <https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573>\
**Category:** News\
**Created:** [7 December 2018 20:49 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573 "2018-12-07T20:49:12Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 December 2018 21:48 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/25 "2018-12-09T21:48:56Z")

</div>

> [@\[Announce\] Dashboard version 2.12.0](https://discourse.nodered.org/t/announce-dashboard-version-2-12-0/5562/9):
>
> Vivaldi latest (based on Chromium) on W10 with Node.JS v8 and Node-RED 0.20.0-beta.2. Adding a spacer, reordering in the sidebar and deploying gives this in the browser console: Resizing the spacer and pressing "Done" (not deployed yet) produces: which hangs the browser. Interestingly, when I reloaded the admin interface, the spacer had disappeared even though it had previously been deployed. In fact, it seems clear that doing a "Modified Nodes" deploy doesn't actually d…

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [9 December 2018 22:25 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/26 "2018-12-09T22:25:01Z")

</div>

OK - that was to do with the spacer (now fixed in 2.12.1) - Paul's issue is to do with using {{ }} syntax to set the labels. Don't think they are the same ???

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 December 2018 23:06 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/27 "2018-12-09T23:06:00Z")

</div>

> [@dceejay](#):
>
> OK - that was to do with the spacer (now fixed in 2.12.1) - Paul's issue is to do with using {{ }} syntax to set the labels. Don't think they are the same ???

Sorry, my bad - too much wine 😄

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [9 December 2018 23:57 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/28 "2018-12-09T23:57:31Z")

</div>

@zenofmud - thanks... found it.. fix pushed as dashboard 2.12.2

---

<div class="post-metadata">

**Author:** ![lucas-pouchot](https://avatars.discourse-cdn.com/v4/letter/l/48db29/32.png) [@lucas-pouchot](https://discourse.nodered.org/u/lucas-pouchot)\
**Post date:** [10 December 2018 15:37 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/29 "2018-12-10T15:37:17Z")

</div>

**Woow** , It seems to have some great work here, I cannot wait for the non-beta, any idea of a date for it ? We'll have a tag beta on **docker** for this version ?

> sorry if this has already been said, but I did not find the information

Thanks.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [10 December 2018 15:39 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/30 "2018-12-10T15:39:54Z")

</div>

> [@knolleary](#):
>
> The plan is to get them resolved over the next few weeks so we can get 0.20-final published in early January.

No plans yet for a docker beta; the automation we have to produce the docker images doesn't pickup beta releases. Not got time at the moment to figure out how to change that.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [10 December 2018 15:44 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/31 "2018-12-10T15:44:26Z")

</div>

@TotallyInformation that spacing is no worse or better than any other node:

![Local_Node-RED](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e7a439288dca637ebdab820c5c7c2d85adb19f8e.png)

I think that length of text only just tips over the grid size, so the whitespace looks larger than it might, but is entirely consistent.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [10 December 2018 16:20 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/32 "2018-12-10T16:20:00Z")

</div>

> [@knolleary](#):
>
> I think that length of text only just tips over the grid size, so the whitespace looks larger than it might, but is entirely consistent.

OK, thanks Nick. I've just not noticed it before. Move obvious with the link out node.

---

<div class="post-metadata">

**Author:** ![rcruicks](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@rcruicks](https://discourse.nodered.org/u/rcruicks)\
**Post date:** [13 December 2018 00:06 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/33 "2018-12-13T00:06:09Z")

</div>

thank you! node-level comments/info is excellent!

hiding node-labels - also very handy

and import/export from/to file -- essential

and thanks for adding the enhanced error handling on Import - will make it much easier to debug copy/paste errors in workshops

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 January 2019 22:49 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/34 "2019-01-04T22:49:37Z")

</div>

Hi @knolleary, Hope you had a good break?

I'm not sure if this is a bug in the beta or not.

I have a function node that uses `global.get` to get an object variable. I then update the local variable using `Object.assign` to merge another object. I don't write the global variable back but none-the-less, it is updated!!!

Didn't expect that! Just wasted a few hours before I realised what was happening.

```javascript
// Allow this fn to use a global variable so that it doesn't
// have to be tied to the controller http get
const data = global.get('wiserAll') || msg.payload

if ( ! data.hasOwnProperty('HeatingChannel') ) {
    node.error('Input data does not appear to be from the Wiser Controller - check the input')
    return
}

// Get saved room temperature/humidity values to enhance data
const hSensors = global.get('currentHumidities')
const tSensors = global.get('currentTemperatures')

// Get the list of rooms
const roomDetails = global.get('rooms', 'file')

// Walk through each room
for ( let room in roomDetails ) {
    
    // Find Wiser room
    // TODO: Move the filter function outside the loop
    let wr = false
    if ( data.hasOwnProperty('Room') ) {
        wr = data.Room.filter(item => {
            let r = false
            if ( (room === item.Name.trim()) ) r = true
            if ( item.Invalid === 'NothingAssigned' ) r = false
            return r
        })[0]
        
    }
    // If we found it, merge the data
    if ( wr ) {
        wr.Name = wr.Name.trim()
        Object.assign(roomDetails[room], wr) // merge wr into the room object (requires Node.js 4+)
    } else {
        // Not in the Wiser controller but we still need some data
        roomDetails[room].id = room.replace(' ', '_')
        roomDetails[room].Name = room
    }
    
} // --- end of room loop --- //

// Add Overall System Demand Data
roomDetails.demand = {}
roomDetails.demand.lastUpdate = new Date()
roomDetails.demand.PercentageDemand = data.HeatingChannel[0].PercentageDemand
roomDetails.demand.DemandOnOffOutput = data.HeatingChannel[0].DemandOnOffOutput
roomDetails.demand.HeatingRelayState = data.HeatingChannel[0].HeatingRelayState
roomDetails.demand.IsSmartValvePreventingDemand = data.HeatingChannel[0].IsSmartValvePreventingDemand

// Add a last updated timestamp
roomDetails.lastUpdate = new Date()

return {'topic': msg.topic, 'payload': roomDetails}

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 January 2019 22:58 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/35 "2019-01-04T22:58:49Z")

</div>

> [@TotallyInformation](#):
>
> I'm not sure if this is a bug or not.

Well, that was interesting. I tried 3 things other than a straight assign, of which only 2 work - all 3 should work as far as I can see:

```javascript
const roomDetails1 = global.get('rooms', 'file') // <== DOESN'T WORK
const roomDetails2 = Object.assign({}, global.get('rooms', 'file')) // <== DOESN'T WORK but should, it creates a shallow clone.
const roomDetails3 = JSON.parse(JSON.stringify(global.get('rooms', 'file'))) // <-- Does work
const roomDetails4 = RED.util.cloneMessage(global.get('rooms', 'file')) // <-- Does work

```

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [4 January 2019 23:29 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/36 "2019-01-04T23:29:06Z")

</div>

@TotallyInformation `Object.assign` is not suitable for deep cloning an object, as explained here: [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Object/assign#Deep\_Clone](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Deep_Clone)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 January 2019 23:38 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/37 "2019-01-04T23:38:11Z")

</div>

OK, but I still didn't expect something that should need a getter to get hold of to be updated in my function node?! I didn't write it back with a set.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [4 January 2019 23:42 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/38 "2019-01-04T23:42:38Z")

</div>

This has been discussed a few times, both here and on the old google group as it isn't a new thing. Javascript passes by reference and the in-memory context doesn't clone objects whenever you get them. So these things can happen.

That's how it has been ever since we introduced the get/set functions. We should probably look at that again - although adding the clone in will have a performance impact, and break flows that, against all documentation and advice, take advantage of that particular behaviour.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 January 2019 23:47 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/39 "2019-01-04T23:47:35Z")

</div>

> [@knolleary](#):
>
> That's how it has been ever since we introduced the get/set functions. We should probably look at that again - although adding the clone in will have a performance impact, and break flows that, against all documentation and advice, take advantage of that particular behaviour.

OK, thanks - I know about the cloning issue but didn't realise it would bite me when doing a `global.get` as I've never seen that happen before. Only seen problems with `msg`.

It would certainly be more consistent and a lot more robust if the getters did a clone since I think that is what everyone would expect.

The msg issue is different and I agree there is no easy way to fix that without significant overheads - that's less of an issue to me at least & you already have a utility function and some work arounds to deal with the issue.

But there is no information about this being an issue with the global/flow/context getters and the utility function implies that it is specific to the `msg` object (though clearly that isn't quite true).

---

<div class="post-metadata">

**Author:** ![vishal](https://avatars.discourse-cdn.com/v4/letter/v/49beb7/32.png) [@vishal](https://discourse.nodered.org/u/vishal)\
**Post date:** [19 January 2019 14:28 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/40 "2019-01-19T14:28:08Z")

</div>

2 issues : 1. I was using node-red-contrib-postgres (version 0.6.1) with the node-red version 0.19.0 and everything was working fine. After installing Node-red beta-3 that postgres node started giving errors :

- "Cannot find C:\Users\Vishal\AppData\Roaming\npm\node\_modules\node-red\red\red"

- in command prompt while starting node-red : [node-red-contrib-postgres/PostgreSql] Error: Cannot find module './lib/red.js'

second problem is in web-sockets : While using worldmap node other websockets gets disconnected after first deploy. I have listed that detailed problem to the owner of world map on github. He said that the problem was with node-red and it is solved in beta version. I used beta version and the problem still persist. here is the link of that detailed discussion : [https://github.com/dceejay/RedMap/issues/65](https://github.com/dceejay/RedMap/issues/65)

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [19 January 2019 14:48 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/41 "2019-01-19T14:48:56Z")

</div>

you’ve posted this on the beta2 announcement not the beta3

---

<div class="post-metadata">

**Author:** ![vishal](https://avatars.discourse-cdn.com/v4/letter/v/49beb7/32.png) [@vishal](https://discourse.nodered.org/u/vishal)\
**Post date:** [19 January 2019 15:11 UTC](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573/42 "2019-01-19T15:11:55Z")

</div>

Problem will still remain same.. But still thanks.. I'll post it on beta 3...

[Previous page](https://discourse.nodered.org/t/node-red-0-20-0-beta-2-released/5573.md?page=1)
