Merge pull request #475 from pathmapper/rtl_blob

Set MIME type for RTL blob
This commit is contained in:
Orange Mug 2018-11-26 10:47:42 +00:00 committed by GitHub
commit 2565a89474
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,9 +3,9 @@ import MapboxGl from 'mapbox-gl'
// Load mapbox-gl-rtl-text using object urls without needing http://localhost for AJAX.
const data = require("raw-loader?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js");
const blob = new window.Blob([data]);
const objectUrl = window.URL.createObjectURL(blob, {
const blob = new window.Blob([data], {
type: "text/javascript"
});
const objectUrl = window.URL.createObjectURL(blob);
MapboxGl.setRTLTextPlugin(objectUrl);