Thanks Aaron. I added in the variable line but I'm getting the same error message... callstack = getCallstack();
callstack.shift();
return (function (cb, ctx, cs, lbl) {
var ctxref = registerCallstack(cs, lbl);
/*jshint -W054 */
var performance = performance || {now:_.now};
return new Function('cb', 'ctx', 'TASlog', "return function TAS_CALLSTACK_" + ctxref + "(){" + "TASlog('Entering: '+(cb.name||'(anonymous function)'));" + "var t0 = performance.now();cb.apply(ctx||{},arguments);var t1 = performance.now();" + "TASlog('Exiting: '+(cb.name||'(anonymous function)')+' (took '+Number(Math.round((t1-t0)+'e3')+'e-3')+' ms)');" + "};")(cb, ctx, log);
/*jshint +W054 */
}
(callback, context, callstack, label));
API log(the last two lines only happen when I run **!setattr --sel --recalc1|1** ) "ReferenceError: performance is not defined"
"ReferenceError: performance is not defined\n at Array.TAS_CALLSTACK_1 (eval at <anonymous> (eval at <anonymous> (evalmachine.<anonymous>:282:6)), <anonymous>:3:99)\n at self.trigger (evalmachine.<anonymous>:77:37)\n at messageHandler (evalmachine.<anonymous>:285:11)\n at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:68:55)\n at emitTwo (events.js:100:13)\n at process.emit (events.js:185:7)\n at handleMessage (internal/child_process.js:695:10)\n at Pipe.channel.onread (internal/child_process.js:440:11)"