diff --git a/packages/core/core.ts b/packages/core/core.ts index 5192cf24..12a7ab39 100644 --- a/packages/core/core.ts +++ b/packages/core/core.ts @@ -59,12 +59,11 @@ export function withBemMod( let entityClassName: string let modNames: string[] - // Use cache to prevent create new component when props are changed. - let ModifiedComponent: ComponentType - return function WithBemMod( WrappedComponent: ComponentType, ) { + // Use cache to prevent create new component when props are changed. + let ModifiedComponent: ComponentType let modifierClassName: string entity = entity || cn(blockName) entityClassName = entityClassName || entity()