[Pkg-owncloud-commits] [owncloud] 161/199: Fix IE8 issue when icon is not defined

David Prévot taffit at moszumanska.debian.org
Sun Jun 1 18:53:21 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit c9d05c66de06290c8c6a8fde06f35652ad796f48
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Fri May 23 16:14:02 2014 +0200

    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.
---
 core/js/js.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/js/js.js b/core/js/js.js
index 44b0a1a..e31f67c 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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list