fix buttons

This commit is contained in:
Dave Conway-Jones 2022-06-10 14:05:30 +01:00
parent 5787896cd5
commit 5d1d99b479
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
4 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
### Change Log for Node-RED Worldmap
- v2.28.2 - Let button declaration be an array
- v2.28.3 - Let button declaration be an array
- v2.28.1 - Fix layer command bug for non-core layers. Issue #195
- v2.28.0 - Better Handling of sidc icons in geojson
- v2.27.3 - Try to handle greatcircles crossing antimeridian

View File

@ -11,7 +11,7 @@ map web page for plotting "things" on.
### Updates
- v2.28.2 - Let button declaration be an array
- v2.28.3 - Let button declaration be an array
- v2.28.1 - Fix layer command bug for non-core layers. Issue #195
- v2.28.0 - Better Handling of sidc icons in geojson
- v2.27.3 - Try to handle greatcircles crossing antimeridian

View File

@ -1,6 +1,6 @@
{
"name": "node-red-contrib-web-worldmap",
"version": "2.28.2",
"version": "2.28.3",
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
"dependencies": {
"@turf/bezier-spline": "~6.5.0",

View File

@ -2166,7 +2166,7 @@ function doCommand(cmd) {
}
}
if (cmd.hasOwnProperty("button")) {
if (!isArray(cmd.button)) { cmd.button = [cmd.button]; }
if (!Array.isArray(cmd.button)) { cmd.button = [cmd.button]; }
cmd.button.forEach(function(b) {
if (b.icon) {
if (!buttons[b.name]) {