Skip to content

Commit

Permalink
Fixed ajax loader for mxl using old mimetype.
Browse files Browse the repository at this point in the history
  • Loading branch information
bneumann committed May 20, 2018
1 parent 3d56ba5 commit ae8c5e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/OpenSheetMusicDisplay/AJAX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class AJAX {
*/
public static ajax(url: string): Promise<string> {
let xhttp: XMLHttpRequest;
const mimeType: string = url.indexOf(".mxl") > -1 ? "text/plain; charset=x-user-defined" : "application/xml";
if (XMLHttpRequest) {
xhttp = new XMLHttpRequest();
} else if (ActiveXObject) {
Expand All @@ -32,7 +33,7 @@ export class AJAX {
}
}
};
xhttp.overrideMimeType("text/xml");
xhttp.overrideMimeType(mimeType);
xhttp.open("GET", url, true);
xhttp.send();
});
Expand Down

0 comments on commit ae8c5e1

Please sign in to comment.