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
I figured it out. It was the empty parts of the string as someone above suggested.
Thanks!
Your original rhino script is buggy, because it doesn't check the type of the argument fields[0][i]
and newData[0][i]
.
Empty string ""
and null
also throw this error.
replaceText()
if (String(fields[0][i]).length){
newBody.replaceText(String(fields[0][i]), String(newData[0][i]));
}