powermanager - Fix wrapping of deferred functions with parameters

pull/2601/head
Martin Boonk 2023-02-24 21:54:49 +01:00
parent 769c4c2793
commit 7f20125fd9
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@
if (!a.__wrapped){
wrapped = ()=>{
let start = Date.now();
let result = a.apply(undefined, arguments.slice(1));
let result = a.apply(undefined, arguments.slice(2)); // function arguments for deferred calls start at index 2, first is function, second is time
let end = Date.now()-start;
let f = a.toString().substring(0,100);
if (settings.logDetails) logDeferred(t, end, f);