by Dave Cohen: avoid fatal error when drupal js initializes before page footer.
authorDave Cohen
Mon, 12 Dec 2011 14:39:15 +0000 (06:39 -0800)
committerDave Cohen
Mon, 12 Dec 2011 14:39:15 +0000 (06:39 -0800)
fb.js

diff --git a/fb.js b/fb.js
index 4f53338..024d1a6 100644 (file)
--- a/fb.js
+++ b/fb.js
@@ -25,9 +25,9 @@ Drupal.behaviors.fb = function(context) {
       var elem = $(this).get(0);
       FB.XFBML.parse(elem);
     });
-  }
 
-  FB_JS.showConnectedMarkup(Drupal.settings.fb.fbu, context);
+    FB_JS.showConnectedMarkup(Drupal.settings.fb.fbu, context);
+  }
 
   // Markup with class .fb_show should be visible if javascript is enabled.  .fb_hide should be hidden.
   jQuery('.fb_hide', context).hide();