That would typically be due to an unclosed parentheses pair, but I'm not seeing such in the code you posted. Are you sure the error is coming from this code fragment?
Some unrelated comments:
If rmaNum is a string, you should be using !== vs !=Any reason you're not using modern ES6 notation? Unless you're supporting very VERY old browsers (e.g. IE) your code can be simplified and compacted by using arrow functions and template literals.