]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't try to initialize the mapstraction canvas if it doesn't exist
authorEvan Prodromou <evan@status.net>
Fri, 12 Nov 2010 16:46:45 +0000 (11:46 -0500)
committerEvan Prodromou <evan@status.net>
Fri, 12 Nov 2010 16:46:45 +0000 (11:46 -0500)
plugins/Mapstraction/MapstractionPlugin.php

index c4ba6464eaa1077e5ca81b8e2fb65439d2f5d782..d5261d8bc7764f833d524462353d0918512f117f 100644 (file)
@@ -156,7 +156,8 @@ class MapstractionPlugin extends Plugin
                                   ' var user = null; '.
                                   (($actionName == 'showstream') ? ' user = scrapeUser(); ' : '') .
                                   ' var notices = scrapeNotices(user); ' .
-                                  ' showMapstraction($("#map_canvas"), notices); '.
+                                 ' var canvas = $("#map_canvas")[0]; ' .
+                                  ' if (typeof(canvas) != "undefined") { showMapstraction(canvas, notices); } '.
                                   '});');
         }