Skip to content

Commit

Permalink
fix: avoid errors due to ngeo update
Browse files Browse the repository at this point in the history
  • Loading branch information
tonio committed Nov 4, 2020
1 parent e2a6ada commit e7dbf41
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,16 @@ const exports = function($scope, $q, $http, $compile, gettext,
return style
}

let text = (this[
geomType === 'LineString' ? 'measureLength' :
geomType === 'Polygon' ? 'measureArea' :
geomType === 'GeometryCollection' ? 'measureAzimut' : ''
].getTooltipElement() || this['measureProfile'].getTooltipElement()).innerHTML
let text
try {
text = (this[
geomType === 'LineString' ? 'measureLength' :
geomType === 'Polygon' ? 'measureArea' :
geomType === 'GeometryCollection' ? 'measureAzimut' : ''
].getTooltipElement() || this['measureProfile'].getTooltipElement()).innerHTML
} catch {
text = ''
}

style.getText().setText(clearText(text))
if (geomType === 'GeometryCollection') {
Expand Down

0 comments on commit e7dbf41

Please sign in to comment.