narkq / react-yandex-metrika

React component for Yandex.Metrika
128 stars 25 forks source link

Version Number doens't accept ints #14

Open jahglow opened 6 years ago

jahglow commented 6 years ago

Hi, great lib. Can you please add conversion of version number to string before evaluation and returning a blocking error that crashes the whole site, that would help. since it's counter intuitive to pass a version NUMBER as a string, but at list covert it to string. it took me to read source code to see where I went wrong, hehe

narkq commented 6 years ago

Thanks! I'll get to that sometime this week. Although that's strange, react should have warned you about the wrong value, since proptypes are in place https://github.com/narkq/react-yandex-metrika/blob/18afeb3a8a69fb76c056541692e0077cc1a6048a/src/component.js#L39 Also, to be fair, version is usually a string, not a number (e.g. '8.6.0').

jahglow commented 6 years ago

True, version is usually a string if it hs minors. Well, then it's my bad)))

ср, 4 апр. 2018 г. в 19:18, Alex Sladkov notifications@github.com:

Thanks! I'll get to that sometime this week. Although that's strange, react should have warned you about the wrong value, since proptypes are in place https://github.com/narkq/react-yandex-metrika/blob/18afeb3a8a69fb76c056541692e0077cc1a6048a/src/component.js#L39 Also, to be fair, version is usually a string, not a number (e.g. '8.6.0').

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/narkq/react-yandex-metrika/issues/14#issuecomment-378659120, or mute the thread https://github.com/notifications/unsubscribe-auth/ANWjLdUd1t6jp6RqkQV-nCWfqfaKNtQnks5tlPJHgaJpZM4TDcSk .