mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-17 03:04:26 +01:00
Merge remote-tracking branch 'origin/master' into aakansha-custom-elements
This commit is contained in:
13
src/utils.ts
13
src/utils.ts
@@ -613,6 +613,19 @@ export const updateObject = <T extends Record<string, any>>(
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
}
|
||||
};
|
||||
|
||||
export const getCustomElementConfig = (
|
||||
customElementConfig: ExcalidrawProps["customElementsConfig"],
|
||||
customType: string,
|
||||
|
||||
Reference in New Issue
Block a user