react-yandex-metrika icon indicating copy to clipboard operation
react-yandex-metrika copied to clipboard

Version Number doens't accept ints

Open jahglow opened this issue 7 years ago • 2 comments
trafficstars

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

jahglow avatar Apr 02 '18 11:04 jahglow

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').

narkq avatar Apr 04 '18 16:04 narkq

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

ср, 4 апр. 2018 г. в 19:18, Alex Sladkov [email protected]:

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 .

jahglow avatar Apr 06 '18 05:04 jahglow