plainPrimaryText and richPrimaryText are not of type string?
Using the example scripts (iterate selection) I'm writing a "Mark/unmark as lyrics" extension in JS (the only one that runs currently, both others are missing the interpreter). When setting the text variable (var text = line.richPrimaryText(); or var text = line.plainPrimaryText();) the text variable does not take string methods like text.includes(...). "TypeError: Result of expression 'text.includes' [undefined] is not a function." text.toString() doesn't work either.