mapbox / mapbox-gl-draw

Draw tools for mapbox-gl-js
https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
ISC License
942 stars 590 forks source link

SyntaxError: missing = in const declaration for old version browsers #853

Closed agiratech-manigandan closed 4 years ago

agiratech-manigandan commented 5 years ago

I am getting syntax Error

SyntaxError: missing = in const declaration

I checked why this is coming . https://github.com/mapbox/mapbox-gl-draw/blob/master/src/feature_types/feature.js in this file const using the loop

if (this.ctx.options.userProperties) { for (const name in this.properties) { properties[user_${name}] = this.properties[name]; } }

Could to change to const to let.

Reference : https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Errors/Missing_initializer_in_const

Thanks

mapbox-gl-js version: mapbox-gl-draw version:

Steps to Trigger Behavior

1. 2. 3.

Expected Behavior

Actual Behavior

kkaefer commented 4 years ago

fixed