Skip to content

Commit c622369

Browse files
authored
Merge branch 'master' into felix/canvas-resize-bug-9.2
2 parents 8069e28 + c1a1688 commit c622369

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/carto/src/layers/vector-tile-layer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export default class VectorTileLayer<
227227
}
228228

229229
// Sort layers so that label layers are rendered after the main layer
230-
const validLayers = layers.flat().filter(Boolean) as Layer[];
230+
const validLayers = (layers || []).flat().filter(Boolean) as Layer[];
231231
validLayers.sort((a: Layer, b: Layer) => {
232232
const aHasLabel = a.id.includes('labels');
233233
const bHasLabel = b.id.includes('labels');

0 commit comments

Comments
 (0)