mapbox / geojsonhint

IMPORTANT: This repo will be archived. Use @placemarkio/check-geojson instead
ISC License
258 stars 37 forks source link

use constructor rather than `constructor.name` for IE11 #70

Closed stutrek closed 5 years ago

stutrek commented 6 years ago

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

Plantain commented 6 years ago

This is breaking IE11 support for many mapboxgldraw use cases. Can this be merged?