Injectjs - Argument reason is null or empty

I’m trying to inject a line of js via the injectjs activity, and when I run the project I get an error “The argument reason is null or empty. Parameter name: reason at Source: UiPath.Core.Activities” when I gets to the section where it injects the JS.

If I switch my JS code to just be “function(){alert(‘hello’)}” it works fine, the pop up box appears. The code I’m using was pulled from an onClick function on an existing webpage, and that code is "jsss.js2fnct(document.getElementById('TrackingForm'),{'TrackingForm:exportCSVCommandLink':'TrackingForm:exportCSVCommandLink'},'');"

That JS code runs just fine if I run it from the console in Chrome on that same webpage, no errors given and I get export csv dialog I’m expecting.

Suggestions/comments? TIA…