Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
garag-lib committed Jun 8, 2024
1 parent 3a04112 commit b679d74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/GTpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ async function reduceFnc(
try {
initval = await fnc.apply(ctx.Root, arrval);
} catch (ex: any) {
STACK(ex.message);
STACK(ex.message, fnc);
initval = undefined;
}
if (index >= functions.length) return initval;
Expand Down Expand Up @@ -253,7 +253,7 @@ async function calculateBind(me: IGtplObject, bind: IBindObject, value?: any, ex
//console.log(fnc, gtpl.Root, arrval);
result = await fnc.apply(gtpl.Root, arrval);
} catch (ex: any) {
STACK(ex.message);
STACK(ex.message, fnc);
result = undefined;
}
} else {
Expand Down Expand Up @@ -344,7 +344,7 @@ function createGetterAndSetter(
},
});
} catch (ex) {
STACK((<any>ex).message, gtpl.Root, key);
STACK((<any>ex).message, key, gtpl.Root);
}
}

Expand Down Expand Up @@ -496,8 +496,8 @@ function checkBindEvent(gtpl: IGtplObject, bind: IBindObject): boolean {
result.apply(obj.gtpl.Root, [event]);
}
} else {
if (event.preventDefault)
event.preventDefault();
if (event.preventDefault)
event.preventDefault();
}
},
passiveSupported ? options : false
Expand Down
7 changes: 3 additions & 4 deletions src/GUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ export function isStaticType(val: any) {

export function log(...args: any): void {
//const functionName = log.caller?.name || arguments.callee.caller?.name;
args.forEach((arg:any)=>{
console.log(arg);
});
console.log('----------');
console.log('%c----------', 'font-weight:bold');
console.log(...args);
console.log('%c----------', 'font-weight:bold');
}

export function STACK(...args: any) {
Expand Down

0 comments on commit b679d74

Please sign in to comment.