Skip to content

Commit

Permalink
Fix bug for "options.wrappe=false"
Browse files Browse the repository at this point in the history
  • Loading branch information
4ok committed Jul 26, 2016
1 parent 43a05a1 commit 092c3a5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# История изменений

## 3.0.5
## 3.0.6

- Исправлен баг для опции `options.wrapper=false`.

## 3.0.5

- Обновлен CHANGELOG.md

## 3.0.4

- Поправлен code style под новые правила eslint
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ module.exports = class MarkdownBemjson {
}

_getWrapper() {
const result = this._options.wrapper || DEFAULT_WRAPPER;
const result = (this._options.wrapper === undefined)
? DEFAULT_WRAPPER
: this._options.wrapper;

if (result !== false && typeof result !== 'object') {
const error = 'Wrapper must be plain object or false';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markdown-bemjson",
"version": "3.0.5",
"version": "3.0.6",
"engines": {
"node": ">=4.0.0"
},
Expand Down

0 comments on commit 092c3a5

Please sign in to comment.