diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-07-11 15:06:13 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-07-11 15:06:13 +0200 |
commit | 4b941bce402bca886ce89eee213eb0ca0bd00dbf (patch) | |
tree | af1098b0d6ba4332e22074e0dcd4370812127293 /modules/luci-base/htdocs/luci-static | |
parent | a7bfaf9b0b2a36c72055e0e23feba193af50e1c9 (diff) |
luci-base: luci.js: only use overrideMimeType when supported
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/luci.js | 4 |
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 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; |