bem / bem-components

Set of components for sites development
https://bem.info/libraries/classic/bem-components/6.0.0/
Other
332 stars 86 forks source link

Fail on dropdown.bh.js in absence of “switcher” #1770

Closed GreLI closed 8 years ago

GreLI commented 8 years ago

If switcher key is absent in BEMJSON, dropdown.bh.js fails on lines 13 and 44 with error messages like “Cannot read property "mix" of undefined”.

narqo commented 8 years ago

I believe, the only relevant solution currently is to add a note to docs that particular fields are required. See relevant issue #1576.

GreLI commented 8 years ago

Why not to allow to add elem: 'switcher' in content?

narqo commented 8 years ago

It's a really weird API, when two different things do the same stuff. And it's getting weirder when you try to document such API (this is the reason we haven't documented content field of the button).