diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-05-23 16:14:02 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-30 10:06:29 +0200 |
commit | c9d05c66de06290c8c6a8fde06f35652ad796f48 (patch) | |
tree | 7ff8ecfad61efe02aee30c244979b31c76494742 /core/js/js.js | |
parent | 0879a63320430b71c832c2c9fc725f3d244c9526 (diff) | |
download | nextcloud-server-c9d05c66de06290c8c6a8fde06f35652ad796f48.tar.gz nextcloud-server-c9d05c66de06290c8c6a8fde06f35652ad796f48.zip |
Fix IE8 issue when icon is not defined
Sometimes no icon file is passed to replaceSVGIcon(), it showed an error
in IE8 and broke the code flow.
This fix adds a check whether the file name is set.
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/js/js.js b/core/js/js.js index 44b0a1a39af..e31f67cca9c 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1250,7 +1250,7 @@ OC.Util = { * @return {string} fixed image path with png extension if SVG is not supported */ replaceSVGIcon: function(file) { - if (!OC.Util.hasSVGSupport()) { + if (file && !OC.Util.hasSVGSupport()) { var i = file.lastIndexOf('.svg'); if (i >= 0) { file = file.substr(0, i) + '.png' + file.substr(i+4); |