don't try to initialize the mapstraction canvas if it doesn't exist

This commit is contained in:
Evan Prodromou 2010-11-12 11:46:45 -05:00
parent 09aaf21e8d
commit b6af5a25ba

View File

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