From 82752f7b26b117a85161ddbf4d46141b6d4841e3 Mon Sep 17 00:00:00 2001 From: mmayeda Date: Mon, 29 Apr 2024 18:14:46 -0600 Subject: [PATCH 1/3] chore: git ignore intellij IDE project files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b0de03a..409813c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules .eslintcache +.idea From 2941faeb8018e29702375ae4351667cc246f64c4 Mon Sep 17 00:00:00 2001 From: mmayeda Date: Tue, 30 Apr 2024 23:00:15 -0600 Subject: [PATCH 2/3] fix: check objects are defined before passing to leaflet's hasLayer method --- src/Map.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Map.js b/src/Map.js index 0fdb95d..1431f5c 100644 --- a/src/Map.js +++ b/src/Map.js @@ -406,12 +406,12 @@ export default class Map { } async _unloadTileServer() { - if (this.map.hasLayer(this.layerTile)) { + if (this.layerTile && this.map.hasLayer(this.layerTile)) { this.map.removeLayer(this.layerTile) } else { log.warn('try to remove nonexisting tile layer') } - if (this.map.hasLayer(this.layerUtfGrid)) { + if (this.layerUtfGrid && this.map.hasLayer(this.layerUtfGrid)) { this.map.removeLayer(this.layerUtfGrid) } else { log.warn('try to remove nonexisting grid layer') @@ -593,7 +593,7 @@ export default class Map { this.layerSelected?.payload, ) - if (this.map.hasLayer(this.layerSelected)) { + if (this.layerSelected && this.map.hasLayer(this.layerSelected)) { this.map.removeLayer(this.layerSelected) } else { log.warn('try to remove nonexisting layer selected') From ebb2cfb3e4b165fd350dfa29aeb97b5569fce853 Mon Sep 17 00:00:00 2001 From: mmayeda Date: Mon, 13 May 2024 22:57:43 -0600 Subject: [PATCH 3/3] build: upgrade to build with node version 20 --- .github/workflows/npm-module-release.yml | 2 +- package-lock.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/npm-module-release.yml b/.github/workflows/npm-module-release.yml index 5791265..6c55873 100644 --- a/.github/workflows/npm-module-release.yml +++ b/.github/workflows/npm-module-release.yml @@ -8,7 +8,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: '16.x' + node-version: '20.x' registry-url: 'https://registry.npmjs.org' - name: Publish run: | diff --git a/package-lock.json b/package-lock.json index a6850da..8394a9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "treetracker-web-map-core", - "version": "2.7.2", + "version": "2.7.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "treetracker-web-map-core", - "version": "2.7.2", + "version": "2.7.3", "license": "ISC", "dependencies": { "axios": "^0.24.0",