Skip to content
This repository was archived by the owner on Feb 4, 2018. It is now read-only.

Commit 9735156

Browse files
author
blond
committed
docs(TypeError): fix example with not valid modifier
1 parent 0849fbc commit 9735156

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,15 @@ const BemEntityName = require('@bem/entity-name');
6565
// The modifier of block
6666
new BemEntityName({
6767
block: 'button',
68-
mod: { name 'view', val: 'action' }
68+
mod: { name: 'view', val: 'action' }
6969
});
7070

7171
// Not valid modifier
7272
new BemEntityName({
73-
block: 'block',
73+
block: 'button',
7474
mod: { val: 'action' }
7575
});
76+
// ➜ EntityTypeError: the object `{ block: 'block', mod: { val: 'action' } }` is not valid BEM entity, the field `mod.name` is undefined
7677
```
7778

7879
To describe the simple modifier, field `mod.val` must be specified as `true`.

0 commit comments

Comments
 (0)