Share feedback, ideas and get community help

D
F
M
a
g

Bug with using inline evaluation of javascript in text string

Ok, so I found a weird bug.

I wanted to display a number that was one higher than the current number (as an option for the minimum amount a user can enter to increase the number)

Intead of precalculating that number and storing in another variable before the text, I used the inline format of {{={{MyVar}}+1=}}.

Later in the text I display {{MyVar}}

Well, it displays the value for {{MyVar}} about 6 characters too early. So for example:

"This is the increased value {{={{MyVar}}+1=}} and then here is the starting value {{MyVar}}."

Let's say the value was 12 this would display as:

"This is the increased value 13 and then here is the 12value {{MyVar}}."

I made a bot to show how it was behaving in the code I was creating and then decided to also just put in this simple example since I think I know what is happening- (sample bot URL in first comment).

I think typebot will adjust the index by 4 to account for the opening and closing {{CurlyBrackets}} on any variable. BUT when there are EXTRA symbols when an inline function is used, typebot is not set up to account for those and so the {{=Inline curly brackets and equals signs=}} throw off the display on the final string of any variables that come after the inline code by 6 because they were removed but the index wasn't adjusted for those with regards to inserting the variables...

Hope I explained that correctly. I was trying to figure out what was going on as I slept and in the shower this morning and I think this is it.

Check it @Baptiste and let me know when it is fixed should be a quick one.
g
B
5 comments
Thanks for the reproduction, I'm checking what's wrong
Alright, fixed!
Available in 10 min
Add a reply
Sign up and join the conversation on Discord
Join