From: Evan Prodromou Date: Fri, 12 Nov 2010 16:46:45 +0000 (-0500) Subject: don't try to initialize the mapstraction canvas if it doesn't exist X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fdf3a23da7769586a818ca2219ec6bc1b46587de;p=quix0rs-gnu-social.git don't try to initialize the mapstraction canvas if it doesn't exist --- diff --git a/plugins/Mapstraction/MapstractionPlugin.php b/plugins/Mapstraction/MapstractionPlugin.php index c4ba6464ea..d5261d8bc7 100644 --- a/plugins/Mapstraction/MapstractionPlugin.php +++ b/plugins/Mapstraction/MapstractionPlugin.php @@ -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); } '. '});'); }