Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

use constructor rather than constructor.name for IE11 #70

Merged
merged 1 commit into from
Mar 25, 2019

Conversation

stutrek
Copy link
Contributor

@stutrek stutrek commented Apr 11, 2018

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
Copy link

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

@asheemmamoowala asheemmamoowala merged commit 86db1d3 into mapbox:master Mar 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

issues with constructor.name in IE11
3 participants