1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-01-10 04:07:35 +02:00

Fixed infinite loop

Replaced `i` with `wpt_i` in `wpoints_loop`!
This commit is contained in:
zigmhount 2022-03-11 23:09:14 +01:00 committed by GitHub
parent bc7ffb39b5
commit cd541e3fe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,10 +396,9 @@ export class GalleryMapLightboxComponent implements OnChanges {
this.mapLayersControlOption.overlays.Paths.addLayer(polyline(path as LatLng[]));
}
if (wpoints.length !== 0) {
console.log("wpoints.length=" + wpoints.length);
wpoints_loop: for (let wpt_i = 0; i < wpoints.length; wpt_i++) {
wpoints_loop: for (let wpt_i = 0; wpt_i < wpoints.length; wpt_i++) {
if (wpoints[wpt_i] === undefined) {
break wpoints_loop;
continue wpoints_loop;
}
this.mapLayersControlOption.overlays.Paths.addLayer(marker(wpoints[wpt_i] as LatLng));
}