From 4b941bce402bca886ce89eee213eb0ca0bd00dbf Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 11 Jul 2019 15:06:13 +0200 Subject: luci-base: luci.js: only use overrideMimeType when supported Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/luci.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/luci-base/htdocs') diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js index 1f883ab802..6659bc51b6 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; -- cgit v1.2.3