Skip to content

Commit

Permalink
test(core): added test for issue bem#407
Browse files Browse the repository at this point in the history
showing that with bugfix bem#401 this test passes
  • Loading branch information
Glazomer authored and yarastqt committed Mar 26, 2020
1 parent bde01d2 commit 4723e3d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/core/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ export function withBemMod<T, U extends IClassNameProps = {}>(
let entityClassName: string
let modNames: string[]

// Use cache to prevent create new component when props are changed.
let ModifiedComponent: ComponentType<any>

return function WithBemMod<K extends IClassNameProps = {}>(
WrappedComponent: ComponentType<T & K>,
) {
// Use cache to prevent create new component when props are changed.
let ModifiedComponent: ComponentType<any>
let modifierClassName: string
entity = entity || cn(blockName)
entityClassName = entityClassName || entity()
Expand Down

0 comments on commit 4723e3d

Please sign in to comment.