Accessing global object post 0.19.x upgrade

#1

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!

0 Likes

#2

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

0 Likes

#3

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.

0 Likes