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

fix(mod): should return undefined if entity is not modifier #58

Merged
merged 2 commits into from
Nov 25, 2016
Merged

Conversation

blond
Copy link
Member

@blond blond commented Nov 25, 2016

Closed #53

@blond blond force-pushed the issue-53 branch 2 times, most recently from fc1648b to 1f6c470 Compare November 25, 2016 09:28
@@ -143,13 +143,16 @@ name.elem; // text

The modifier of this entity.

If entity is not modifier then returns empty object.
**Important:** If entity is not modifier then returns `undefined`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a modifier (здесь и ниже)

const modName = new BemEntityName({ block: 'button', mod: 'disabled' });

blockName.mod; // { name: 'disabled', val: true }
modName.mod; // undefined
Copy link
Member

@skad0 skad0 Nov 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Перепутан результат, у modName он будет { name: 'disabled', val: true }

* const modName = new BemEntityName({ block: 'button', mod: 'disabled' });
*
* console.log(blockName.mod); // { name: 'disabled', val: true }
* console.log(modName.mod); // undefined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Аналогично

@blond blond merged commit 2690db2 into master Nov 25, 2016
@blond blond deleted the issue-53 branch November 25, 2016 11:05
@blond blond removed the in progress label Nov 25, 2016
@blond blond self-assigned this Nov 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants