From b6af5a25ba61ef3c86a3772abea7ac95778689f7 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 12 Nov 2010 11:46:45 -0500 Subject: [PATCH] don't try to initialize the mapstraction canvas if it doesn't exist --- plugins/Mapstraction/MapstractionPlugin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } '. '});'); } -- 2.39.5