caniuse-api icon indicating copy to clipboard operation
caniuse-api copied to clipboard

fix: isSupported when feature name is not in db

Open cloudfroster opened this issue 7 years ago • 2 comments

Bug

when use

isSupported('notTheCssName', 'chrome')

occur error : Cannot read property 'stats' of undefined

break change

no

cloudfroster avatar Jul 11 '17 03:07 cloudfroster

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)

Nyalab avatar Mar 02 '18 14:03 Nyalab

This is implemented in a better version here: https://github.com/Nyalab/caniuse-api/pull/90

neenhouse avatar Jan 27 '20 03:01 neenhouse