caniuse-api
caniuse-api copied to clipboard
fix: isSupported when feature name is not in db
Bug
when use
isSupported('notTheCssName', 'chrome')
occur error : Cannot read property 'stats' of undefined
break change
no
if the feature name does not exist, we should throw a ReferenceError
, not fail silently, could you revise the code so it does that please?
if you look at the isSupported
tests, the third one should test that in theory, why does it not work?
(you need to rebase your work on master
so it works with the current version of caniuse-lite
)
This is implemented in a better version here: https://github.com/Nyalab/caniuse-api/pull/90