# Accessing global object post 0.19.x upgrade

**URL:** <https://discourse.nodered.org/t/accessing-global-object-post-0-19-x-upgrade/2974>\
**Category:** General\
**Created:** [9 September 2018 00:33 UTC](https://discourse.nodered.org/t/accessing-global-object-post-0-19-x-upgrade/2974 "2018-09-09T00:33:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![redDawn](https://avatars.discourse-cdn.com/v4/letter/r/77aa72/32.png) [@redDawn](https://discourse.nodered.org/u/redDawn)\
**Post date:** [9 September 2018 00:33 UTC](https://discourse.nodered.org/t/accessing-global-object-post-0-19-x-upgrade/2974/1 "2018-09-09T00:33:43Z")

</div>

Previously running 0.18.7, I was able to access a global object, loaded via settings.js, by doing the following:

var count=global.get("gVar.counter")  
global.set("gVar.counter",count);  
msg.payload = global.get("gVar.counter");  
return msg;

...the above results in undefined with 0.19.x

Now, I need to do this with 0.19.3

var count=global.get("gVar").counter;  
global.set("gVar.counter",count);  
msg.payload = global.get("gVar").counter;  
return msg;

Is this intended? Seems like the "get" changed and "set" remains the same.

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:** [9 September 2018 06:50 UTC](https://discourse.nodered.org/t/accessing-global-object-post-0-19-x-upgrade/2974/2 "2018-09-09T06:50:41Z")

</div>

No, not intended and a bug that needs fixing. Please raise an issue on GitHub.

---

<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:** [9 September 2018 10:09 UTC](https://discourse.nodered.org/t/accessing-global-object-post-0-19-x-upgrade/2974/3 "2018-09-09T10:09:40Z")

</div>

I've pushed a fix for this to git. We'll do 0.19.4 in the next day or two - apologies for the inconvenience.
