Skip to content

Commit

Permalink
JavaScript Fix for ckan modules
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
johnmartin committed Aug 29, 2012
1 parent a0bb931 commit 52efccf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ckan/public/base/javascript/module.js
Expand Up @@ -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;
Expand Down

0 comments on commit 52efccf

Please sign in to comment.