Setting null as the default value for an object ca...
# 🤝help
e
I'm trying to set the default value of an object under the global User variables in preferences. I've noticed that entering undefined only shows an error message but typing null and waiting a few seconds causes the screen to go white.
a
Hi @early-camera-62649 , how are you setting the default value? I was able to create a variable with a null value without any errors.
I also ran this in an execute code card without error
user.myVar = {a: null}
e
Hey Gordy! Sorry i should have specified rather than setting a key in an object to null
{ a: null }
i set the entire object to
null
. I also just realized these console messages that showed up as the page went white.
a
I'm not a Javascript philosopher, but can an object be and object if it is null? Botpress cloud is built for strongly typed typescript, not pure javascript, so this might be causing friction. @acceptable-gold-88171 may know more about this.
e
I suppose it depends on the internal type and whether it supports
undefined
,
null
, both, or neither. If null isn't supported as a value im ok with that!
undefined
displays an error but the dashboard doesn't entirely break I just wanted to bring awareness to how the platform breaks entirely showing just a white screen.
Something i just noticed is that if i set null as the default value it breaks a specific area of the editor. For example: - If i set the default value of an object to null for a Workflow Property then it only breaks the side panel. - If i set the default value of a User Variable under bot settings then the entire page becomes white and unusable.
This is the result of the first example:
and the associated error messages
a
That's a good catch! I've sent these bugs to the engineering team. Thanks 🙌
e
No problem! Glad I could help 😁
32 Views