Skip to content

Commit

Permalink
Merge pull request #123 from bem/retnull
Browse files Browse the repository at this point in the history
Readme: describe `return null`
  • Loading branch information
mishanga committed Mar 16, 2015
2 parents 0ad1ce8 + 4fe0011 commit 130e010
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ bh.match('header', function(ctx) {
});
```
*NB*: Any non-undefined value will replace current node in BEMJSON tree. So you can delete current node just returning `null` value.
Then wrap a content of `button` block with `content` element:
```javascript
Expand Down
2 changes: 2 additions & 0 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ bh.match('header', function(ctx) {
});
```
*Замечание*: Любое не-undefined значение вставляется в конечное BEMJSON-дерево вместо текущего узла. Соответственно, удалить текущий узел можно просто вернув значение `null`.
Обернем содержимое `button` элементом `content`:
```javascript
Expand Down

0 comments on commit 130e010

Please sign in to comment.