From ad50de1cf57092a3fa808671cd611d8cc3fe5156 Mon Sep 17 00:00:00 2001 From: Anna Sobiepanek Date: Thu, 1 Jul 2010 19:06:11 -0400 Subject: [PATCH] #69 added dhodgin's fix --- popcorn.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/popcorn.js b/popcorn.js index 6c122d5..7b76705 100644 --- a/popcorn.js +++ b/popcorn.js @@ -417,11 +417,13 @@ this.onIn = function() { MapCommand.map.setCenter(this.location); MapCommand.map.setZoom(this.params.zoom); - var link = document.createElement("a"); - link.setAttribute("href", this.params.src); - link.setAttribute("target", "_new"); - link.appendChild(document.createTextNode(this.params.description)); - document.getElementById('mapinfo').appendChild(link); + if (this.params.src) { + var link = document.createElement("a"); + link.setAttribute("href", this.params.src); + link.setAttribute("target", "_new"); + link.appendChild(document.createTextNode(this.params.description||this.params.src)); + document.getElementById('mapinfo').appendChild(link); + } }; this.onOut = function() { MapCommand.map.setCenter(new google.maps.LatLng(0, 0)); -- 2.43.0