Skip to content
Browse files

Bug fix in login link JS callback

  • Loading branch information...
1 parent 0df7cfc commit a84b3f75f435cf4bc681a313717e873dac759fd1 Benoit Hediard committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 web-app/js/login-link.js
View
6 web-app/js/login-link.js
@@ -1,11 +1,11 @@
-$('a.fb-sdk-login-link').click(function() {
+$('a.fb-sdk-login-link').click(function(event) {
var link = $(this);
link.attr('disabled', 'disabled');
FB.login(function(response) {
if (link.data('callback') != undefined) {
var callback = window[link.data('callback')];
- if (typeof fn === 'function') {
- callback(response);
+ if (typeof callback === 'function') {
+ callback(response, event.target);
}
} else if (response.authResponse) {
// user is logged

0 comments on commit a84b3f7

Please sign in to comment.
Something went wrong with that request. Please try again.