chore: add ga for most actions (#4829)
This commit is contained in:
13
src/utils.ts
13
src/utils.ts
@ -612,3 +612,16 @@ export const updateObject = <T extends Record<string, any>>(
|
||||
...updates,
|
||||
};
|
||||
};
|
||||
|
||||
export const isPrimitive = (val: any) => {
|
||||
const type = typeof val;
|
||||
return val == null || (type !== "object" && type !== "function");
|
||||
};
|
||||
|
||||
export const getFrame = () => {
|
||||
try {
|
||||
return window.self === window.top ? "top" : "iframe";
|
||||
} catch (error) {
|
||||
return "iframe";
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user