Refactoring: improve special components

This commit is contained in:
Pieter Vander Vennet 2023-04-24 03:36:02 +02:00
parent fcc49766d4
commit 94635337e6
4 changed files with 16 additions and 23 deletions

View file

@ -76,7 +76,7 @@ export default class InputHelpers {
mapProperties = { ...mapProperties, location }
}
let zoom = 17
if (properties.args[0]) {
if (properties?.args?.[0] !== undefined) {
zoom = Number(properties.args[0])
if (isNaN(zoom)) {
throw "Invalid zoom level for argument at 'length'-input"