Welcome! Let me repeat ... am not a developer. Normally I should stay away from responding in the developer forum, but due to your plea and 'urgency', I happened to know how to un-do.
Now for the question ... 'why this js line addition fails' ... trying to think like a developer, I'd probably ask what is in the .js file. So if a true developer decides to jump in here and help, be prepared to provide some more info.
Best of luck! Outta here ... have done all I can do!
'SoS', Ken