From 971ba490921286ea629f4baae7c4535547d44e23 Mon Sep 17 00:00:00 2001 From: Thomas Neirynck Date: Fri, 15 Nov 2019 15:13:25 -0500 Subject: [PATCH] review --- .../legacy/plugins/maps/public/layers/vector_tile_layer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/maps/public/layers/vector_tile_layer.js b/x-pack/legacy/plugins/maps/public/layers/vector_tile_layer.js index 2d4fdd634ecc8..d714ac3b092f6 100644 --- a/x-pack/legacy/plugins/maps/public/layers/vector_tile_layer.js +++ b/x-pack/legacy/plugins/maps/public/layers/vector_tile_layer.js @@ -51,7 +51,7 @@ export class VectorTileLayer extends TileLayer { const spriteSheetImageData = await loadSpriteSheetImageData(styleAndSprites.spriteMeta.png); const data = { ...styleAndSprites, - spriteSheetImageData: spriteSheetImageData + spriteSheetImageData }; stopLoading(SOURCE_DATA_ID_ORIGIN, requestToken, data, {}); } catch(error) { @@ -166,6 +166,9 @@ export class VectorTileLayer extends TileLayer { } const imageData = this._getSpriteImageData(); + if (!imageData) { + return; + } addSpriteSheetToMapFromImageData(newJson, imageData, mbMap); //sync layers