Showing
1 changed file
with
2 additions
and
2 deletions
@@ -622,10 +622,10 @@ export default abstract class LeafletMap { | @@ -622,10 +622,10 @@ export default abstract class LeafletMap { | ||
622 | 622 | ||
623 | // Polyline | 623 | // Polyline |
624 | 624 | ||
625 | - updatePolylines(polyData: FormattedData[][], updateBounds = true, data?: FormattedData) { | 625 | + updatePolylines(polyData: FormattedData[][], updateBounds = true, activePolyline?: FormattedData) { |
626 | const keys: string[] = []; | 626 | const keys: string[] = []; |
627 | polyData.forEach((dataSource: FormattedData[]) => { | 627 | polyData.forEach((dataSource: FormattedData[]) => { |
628 | - data = data || dataSource[0]; | 628 | + const data = activePolyline || dataSource[0]; |
629 | if (dataSource.length && data.entityName === dataSource[0].entityName) { | 629 | if (dataSource.length && data.entityName === dataSource[0].entityName) { |
630 | if (this.polylines.get(data.entityName)) { | 630 | if (this.polylines.get(data.entityName)) { |
631 | this.updatePolyline(data, dataSource, this.options, updateBounds); | 631 | this.updatePolyline(data, dataSource, this.options, updateBounds); |