My mistake was that my IDE automatically formats my code. In every case this is desired, however my function does not contain a name and the IDE will automatically put a space behind the ‘function’ keyword: function (instance, properties, context) { should be function(instance, properties, context) { (notice the space between ‘function’ and ‘(’ ).
This is what broke my function and is something to keep in mind for others when looking over things.
1 Like