rename name to customType

This commit is contained in:
ad1992 2022-03-24 14:04:31 +05:30
parent 3d0a1106ff
commit 8706277d14
11 changed files with 22 additions and 22 deletions

View file

@ -615,10 +615,10 @@ export const updateObject = <T extends Record<string, any>>(
export const getCustomElementConfig = (
customElementConfig: ExcalidrawProps["customElementsConfig"],
name: string,
customType: string,
) => {
if (!customElementConfig) {
return null;
}
return customElementConfig.find((config) => config.name === name);
return customElementConfig.find((config) => config.customType === customType);
};