Search Pattern Error Since Google Scripts V8 Update
Ever since google forced the update 'This project is running on our new Apps Script runtime powered by Chrome V8.' I'm getting the following error and I don't understand why. 'Exc
Solution 1:
Possible cause(s):
Your original rhino script is buggy, because it doesn't check the type of the argument
fields[0][i]
andnewData[0][i]
.Empty string
""
andnull
also throw this error.
Answer :
- Cast type and check length of the argument before feeding it to
replaceText()
Snippet:
if (String(fields[0][i]).length){
newBody.replaceText(String(fields[0][i]), String(newData[0][i]));
}
Post a Comment for "Search Pattern Error Since Google Scripts V8 Update"