diff options
| author | Raphael Collet <rco@openerp.com> | 2012-11-28 10:28:21 +0100 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2012-11-28 10:28:21 +0100 |
| commit | 99e58b85668295da03fed66f99176d8dfc1e1edb (patch) | |
| tree | dc44e52f4c4c958ea88b69a0ae70f4cf7bc3601d /addons/auth_oauth/static/src/js/auth_oauth.js | |
| parent | 0dbea5192a1aa2f193e9df6e6459987f7588e144 (diff) | |
[IMP] auth_oauth: make js code more robust
bzr revid: rco@openerp.com-20121128092821-2pig86cyknkgkai5
Diffstat (limited to 'addons/auth_oauth/static/src/js/auth_oauth.js')
| -rw-r--r-- | addons/auth_oauth/static/src/js/auth_oauth.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/auth_oauth/static/src/js/auth_oauth.js b/addons/auth_oauth/static/src/js/auth_oauth.js index fdf7baf607c..c63a51ba83a 100644 --- a/addons/auth_oauth/static/src/js/auth_oauth.js +++ b/addons/auth_oauth/static/src/js/auth_oauth.js @@ -33,7 +33,9 @@ openerp.auth_oauth = function(instance) { this.$(".oe_login_pane form ul").after(buttons); }, on_oauth_sign_in: function(ev) { - ev.preventDefault(); + if (ev) { + ev.preventDefault(); + } var index = $(ev.target).data('index'); var provider = this.oauth_providers[index]; var return_url = _.str.sprintf('%s//%s/auth_oauth/signin', location.protocol, location.host); |
