Skip to content

Commit

Permalink
Made url attribute hidden if null
Browse files Browse the repository at this point in the history
  • Loading branch information
afogelberg committed May 26, 2016
1 parent b36ec7f commit 318c3c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/featureinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,12 @@ module.exports = function(opt_options) {
title = '<b>' + attribute['title'] + '</b>';
}
if (attribute['url']) {
if(feature.get(attribute['url'])) {
var url = createUrl(attribute['urlPrefix'], attribute['urlSuffix'], feature.get(attribute['url']));
val = '<a href="' + url + '" target="_blank">' +
feature.get(attribute['name']) +
'</a>';
}
}
}
}
Expand Down

0 comments on commit 318c3c4

Please sign in to comment.