variable changes to string
# 🤝help
l
@fresh-fireman-491 @bumpy-butcher-41910 This is not fixed, all variables are not only showing as string, but sporadically some of them are reset to string causing code error
Copy code
console.log("End Date ", workflow.end_date.substring(0, 10));
                                                   ^^^^^^^^^^
while for workflow.start_date.substring(0,10) it is working in our code
b
sorry what exactly is the issue here? im not able to do much with this code snippet
l
@bumpy-butcher-41910 the variable type changes back to string - In another thread, we discussed this and you mentioned it is a UI bug. However, if the see workflow.end_date is a date. Not only in the UI but even in the code it changes to a string and throws an error On the other hand workflow.start_date is also a date, although in the UI it changes to string, in the code it continues to remain as a date. So the behavior is sporadic and unpredictable, breaking the code https://cdn.discordapp.com/attachments/1255587943310168164/1255708824464261180/image.png?ex=667e1d79&is=667ccbf9&hm=ba3e3883f78863245079240825649d5881168f71a3787551118d64f690fa04e8& https://cdn.discordapp.com/attachments/1255587943310168164/1255708824736894976/image.png?ex=667e1d79&is=667ccbf9&hm=67c86c9fd3277a7f58b3454c08ea43ac69232c3f5c5657aefb1d03252918dc60&
f
The images that you sent shows that its just a UI bug. Have you tried deleting the end_date and create it again?
l
if it is just a UI bug, then it should not give this error
Copy code
console.log("End Date ", workflow.end_date.substring(0, 10));
                                                   ^^^^^^^^^^
f
Which error is it giving you?
l
workflow.end_date does not have a property substring while workflow.start_date.substring(0,10) executes. i will delete and check. Post deleting if it works, then it is not limited to a UI issue
w
I'm also experiencing this issue -- it is a serious annoyance
deleting and recreating the variable causes the references to the original variable to break / be deleted -- not a viable approach for a bot with scores of variables
to expand on why it's annoying - -aside from making debugging difficult, this issue appears to affect variables originally configured as boolean -- for example, a variable that should set as boolean
false
will instead set as string
"false"
, the latter of which evaluates truthy and breaks the logic
l
@bumpy-butcher-41910