summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-07-11 15:06:13 +0200
committerJo-Philipp Wich <jo@mein.io>2019-07-11 15:06:13 +0200
commit4b941bce402bca886ce89eee213eb0ca0bd00dbf (patch)
treeaf1098b0d6ba4332e22074e0dcd4370812127293
parenta7bfaf9b0b2a36c72055e0e23feba193af50e1c9 (diff)
luci-base: luci.js: only use overrideMimeType when supported
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/luci.js4
1 files changed, 3 insertions, 1 deletions
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;