Skip to content

RESOLVED - tbl roll Not Evaluated Until End of Script? #52

Answered by jon-heard
ericbright2002 asked this question in Q&A
Discussion options

You must be logged in to vote

Try replacing this line:

if (result.includes("Action") && result.includes("Theme")) {

with this line (note the addition of [0]):

if (result[0].includes("Action") && result[0].includes("Theme")) {

The shortcut "tbl roll" returns a string of the result, even if that string is a comma separated string. However, it returns it within an array. It is an array of size 1, but it's still an array. An example return value might be [ "monkey, dolphin, parakeet" ].

I recognize that this might be confusing. The explanation is a bit involved. Let me know if you're curious and I'll explain.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ericbright2002
Comment options

Answer selected by ericbright2002
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants