1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 20:00:13 +02:00

fix detection of content type for non-native requests

This commit is contained in:
Anton Romanov
2015-08-19 16:18:18 -07:00
parent eaad1f28df
commit 10fc1adf6e

View File

@@ -564,7 +564,7 @@ Tomahawk.ajax = function(url, settings) {
contentType = 'application/json'; contentType = 'application/json';
} else if (contentType === 'xml') { } else if (contentType === 'xml') {
contentType = 'text/xml'; contentType = 'text/xml';
} else if (xhr.hasOwnProperty('getResponseHeader')) { } else if (typeof xhr.getResponseHeader !== 'undefined') {
contentType = xhr.getResponseHeader('Content-Type'); contentType = xhr.getResponseHeader('Content-Type');
} else if (xhr.hasOwnProperty('contentType')) { } else if (xhr.hasOwnProperty('contentType')) {
contentType = xhr['contentType']; contentType = xhr['contentType'];