JXcore throw error when add task

137 Views Asked by At

I got this error when I was trying to use jxcore.tasks.addTask function in my program.

undefined:1
function (){}
 ^
SyntaxError: Unexpected token u
    at Object.parse (native)
    at gcc (_jx_tasks.js:130:24)
    at process.<anonymous> (_jx_tasks.js:425:3)
    at process.emit (events.js:106:17)
    at process.__makeCall (node.js:420:23)

I'm not sure that jxcore.tasks.addTask function makes it or not, it's only happened when I declare a new prototype for Array. Simple code below in my program throw this error:

Array.prototype.doSomething = function(){};
jxcore.tasks.addTask(function () {}, {}, function () {});
1

There are 1 best solutions below

0
On BEST ANSWER

The issue should be fixed now.

You haven't mentioned, which JXcore version you are using, but if it's 0.2.3.7 and below (judging by the error output syntax), then you should switch to current open source version available on github.com/jxcore/jxcore where the fix was applied.