From d0d585df5872dcced34e2541cb9afdc1c07b55ed Mon Sep 17 00:00:00 2001 From: John Martin Date: Wed, 29 Aug 2012 12:57:55 +0100 Subject: [PATCH] JavaScript Fix for ckan modules This fixes a lot of JavaScript issues with ckan modules in Internet Explorer 7. Essentially IE7 doesn't have the subtype window.SyntaxError and the majority of times this is falling through the if statement and still throwing the error (because the error type in IE7 is window.Error). This fix makes a lot of modules work, however since I don't have much visibility on the codebase yet I'm not sure what the implications on changing such a re-used bit of code would be. --- ckan/public/base/javascript/module.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ckan/public/base/javascript/module.js b/ckan/public/base/javascript/module.js index 0427b9a7ac6..877a0858f1d 100644 --- a/ckan/public/base/javascript/module.js +++ b/ckan/public/base/javascript/module.js @@ -350,11 +350,7 @@ this.ckan = this.ckan || {}; // If we have a boolean attribute (no value) then set to true. value = attr.value === "" ? true : jQuery.parseJSON(attr.value); } catch (error) { - if (error instanceof window.SyntaxError) { - value = attr.value; - } else { - throw error; - } + value = attr.value; } options[jQuery.camelCase(prop)] = value;