-
Notifications
You must be signed in to change notification settings - Fork 62
Unregistered has() features fail silently... #172
Comments
|
While I am on border on this upon further reflection, I found some issues when breaking out the shims where the feature was added as
But we have an |
the fact we've actually managed to fail at that in our own code does give more credence to the argument :).
you could argue that the |
exists, and lowercase feature names. fixes dojo#172
exists, and lowercase feature names. fixes dojo#172
exists, and lowercase feature names. fixes dojo#172
Issue moved to dojo/has #18 via ZenHub |
Three challenges with the
has()
API:undefined
. This leads to potential logic errors, assuming a feature is being properly detected when in fact it isn't. We should throw.add
is passed withoverride = false
it simply returns afalse
if theadd
fails because it is already present. The way we currently consume the API, we don't handle those failures and it is likely that those downstream using the API will do the same. We should consider throwing when the override fails, as it is clearly again something someone should be explicit about, instead of unintentional behaviour.The text was updated successfully, but these errors were encountered: