Merge pull request #47191 from Faless/js/4.x_force_mime

[HTML5] Fix loading when mime-type is missing.
This commit is contained in:
Rémi Verschelde 2021-03-20 23:09:45 +01:00 committed by GitHub
commit 6d13bfc914
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,7 +102,7 @@ const Engine = (function () {
const me = this;
function doInit(promise) {
return promise.then(function (response) {
return Godot(me.config.getModuleConfig(loadPath, response.clone()));
return Godot(me.config.getModuleConfig(loadPath, new Response(response.clone().body, { 'headers': [['content-type', 'application/wasm']] })));
}).then(function (module) {
const paths = me.config.persistentPaths;
return module['initFS'](paths).then(function (err) {