Skip to content

Commit

Permalink
fix init with empty widgetValues on mapWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
antoine37120 committed Apr 25, 2024
1 parent e624a5a commit 566ceba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sparnatural/components/widgets/MapWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default class MapWidget extends AbstractWidget {

#redrawSelection = () => {

if(this.widgetValues !== undefined) {
if ((this.widgetValues !== undefined) && (this.widgetValues.length > 0)) {
let options = {
color: "#3388ff",
weight: 3,
Expand Down Expand Up @@ -207,7 +207,7 @@ export default class MapWidget extends AbstractWidget {

this.#redrawSelection() ;

if(this.widgetValues !== undefined) {
if ((this.widgetValues !== undefined) && (this.widgetValues.length > 0)) {

var layers = [];
//layers = L.PM.Utils.findLayers(this.map)
Expand Down

0 comments on commit 566ceba

Please sign in to comment.