Skip to content

Commit

Permalink
temp fix for mapbox-gl-draw compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Molly Lloyd committed Apr 20, 2018
1 parent 1b6c61e commit 29b0c56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/util/evented.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ export class Evented {
}

fire(event: Event) {
// fix for mapbox-gl-draw
if (typeof event === "string") {
event = new Event(event);
}

const type = event.type;

if (this.listens(type)) {
Expand Down

0 comments on commit 29b0c56

Please sign in to comment.