React-styleguidist: Default prop evaluated in global scope

Created on 2 Aug 2017  路  3Comments  路  Source: styleguidist/react-styleguidist

This commit line introduced a bug: we have default object-like value in local scope (inside IIFE, in example), but styleguidist is evaluating it in global scope and eval throws.

Possible solution is to wrap eval in try-catch statement with rendering default value as "Object" when no global variable is available.

bug

All 3 comments

Hi, thanks for reporting. That's a good point, we didn't think of that. I can fix this tonight

Should be fixed in 63b3369, will be a part of the next version @sapegin releases

@esphen Thanks! Fixes are released automatically, so expect a new version in ~10 minutes ;-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidjb picture davidjb  路  3Comments

sapegin picture sapegin  路  3Comments

crobinson42 picture crobinson42  路  3Comments

hueyhe picture hueyhe  路  4Comments

dlim-dlim picture dlim-dlim  路  4Comments