mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 18:42:56 +00:00
fix: fix monitor utils incorrect assignment method
This commit is contained in:
parent
75626d877d
commit
bf280c6fa1
@ -1,6 +1,6 @@
|
||||
export class Monitor {
|
||||
fn = (params: any) => {
|
||||
const { AES } = window as any;
|
||||
const { AES = {} } = window as any;
|
||||
if (typeof AES.log === 'function') {
|
||||
const { p1 = '', p2 = '', p3 = '', p4 = 'OTHER', ...rest } = params || {};
|
||||
AES.log('event', {
|
||||
@ -13,10 +13,6 @@ export class Monitor {
|
||||
}
|
||||
};
|
||||
|
||||
constructor() {
|
||||
(window as any).AES = (window as any).AES || {};
|
||||
}
|
||||
|
||||
register(fn: () => any) {
|
||||
if (typeof fn === 'function') {
|
||||
this.fn = fn;
|
||||
@ -30,7 +26,7 @@ export class Monitor {
|
||||
}
|
||||
|
||||
setConfig(key: string | object, value?: string): void {
|
||||
const { AES } = window as any;
|
||||
const { AES = {} } = window as any;
|
||||
if (typeof AES?.setConfig !== 'function') {
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user