Do not barf if glyphs url not set #113

This commit is contained in:
Lukas Martinelli 2017-03-28 11:00:58 -04:00
parent 56f1e58df0
commit 732d231c78

View file

@ -70,7 +70,7 @@ function replaceAccessToken(mapStyle) {
}
const changedStyle = {
...mapStyle,
glyphs: mapStyle.glyphs.replace('{key}', accessToken),
glyphs: mapStyle.glyphs ? mapStyle.glyphs.replace('{key}', accessToken) : mapStyle.glyphs,
sources: changedSources
}