summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@users.noreply.github.com>2016-09-30 15:55:46 -0700
committerGitHub <noreply@github.com>2016-09-30 15:55:46 -0700
commitee4715a821437e6ed374231fad2ca6193eeac499 (patch)
treea1572535dae544aea91c963d3577a4ecb99c5e2c /scripts
parent5b28ebbeca8f28e4a8d415911c51eb5070c3362a (diff)
downloadqtlocation-mapboxgl-ee4715a821437e6ed374231fad2ca6193eeac499.tar.gz
update style generation code for new style spec enum values docs (#6508)
Documentation for enum values landed in mapbox/mapbox-gl-style-spec#510. This updates Android, iOS, and macOS documentation code gen scripts to capitalize on them.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/generate-style-code.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/generate-style-code.js b/scripts/generate-style-code.js
index 4c5f148a00..77aecbe18c 100644
--- a/scripts/generate-style-code.js
+++ b/scripts/generate-style-code.js
@@ -102,7 +102,7 @@ const layerCpp = ejs.compile(fs.readFileSync('src/mbgl/style/layers/layer.cpp.ej
const propertiesHpp = ejs.compile(fs.readFileSync('src/mbgl/style/layers/layer_properties.hpp.ejs', 'utf8'), {strict: true});
const propertiesCpp = ejs.compile(fs.readFileSync('src/mbgl/style/layers/layer_properties.cpp.ejs', 'utf8'), {strict: true});
-const layers = spec.layer.type.values.map((type) => {
+const layers = Object.keys(spec.layer.type.values).map((type) => {
const layoutProperties = Object.keys(spec[`layout_${type}`]).reduce((memo, name) => {
if (name !== 'visibility') {
spec[`layout_${type}`][name].name = name;