IE11 gives undefined for this :({}).constructor.name.
This PR changes the requiredProperty function to check the identity of the constructor rather than the name of it.
fixes #69 and mapbox/mapbox-gl-draw#666
Although this fixes the 99% case, I recommend finding another way of checking for validity, since this will fail for objects created with Object.create(null).
IE11 gives undefined for this :
({}).constructor.name
.This PR changes the requiredProperty function to check the identity of the constructor rather than the name of it.
fixes #69 and mapbox/mapbox-gl-draw#666
Although this fixes the 99% case, I recommend finding another way of checking for validity, since this will fail for objects created with
Object.create(null)
.