diff --git a/src/tileEngine.js b/src/tileEngine.js index 8219717c..9b85b1bb 100644 --- a/src/tileEngine.js +++ b/src/tileEngine.js @@ -526,7 +526,7 @@ export default function TileEngine(properties = {}) { context.save(); context.globalAlpha = layer.opacity; - layer.data.map((tile, index) => { + (layer.data || []).map((tile, index) => { // skip empty tiles (0) if (!tile) return;