From: Jo-Philipp Wich Date: Thu, 11 Jul 2019 13:06:13 +0000 (+0200) Subject: luci-base: luci.js: only use overrideMimeType when supported X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4b941bce402bca886ce89eee213eb0ca0bd00dbf;p=oweals%2Fluci.git luci-base: luci.js: only use overrideMimeType when supported Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js index 1f883ab80..6659bc51b 100644 --- a/modules/luci-base/htdocs/luci-static/resources/luci.js +++ b/modules/luci-base/htdocs/luci-static/resources/luci.js @@ -329,7 +329,9 @@ opt.xhr.open(opt.method, opt.url, true); opt.xhr.responseType = 'text'; - opt.xhr.overrideMimeType('application/octet-stream'); + + if ('overrideMimeType' in opt.xhr) + opt.xhr.overrideMimeType('application/octet-stream'); if ('timeout' in opt) opt.xhr.timeout = +opt.timeout;