Skip to content

Commit

Permalink
Avoid TypedArray#slice (not available in IE11)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed May 23, 2018
1 parent f0bf692 commit 1a8e9fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ class Map extends Camera {
'or object with `width`, `height`, and `data` properties with the same format as `ImageData`')));
} else {
const {width, height, data} = image;
this.style.addImage(id, { data: new RGBAImage({width, height}, data.slice(0)), pixelRatio, sdf });
this.style.addImage(id, { data: new RGBAImage({width, height}, new Uint8Array(data)), pixelRatio, sdf });
}
}

Expand Down

0 comments on commit 1a8e9fe

Please sign in to comment.