From b4c4452882090eac353d64d30e9af3484250ea66 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sat, 24 Feb 2024 14:29:25 +0100 Subject: [PATCH] Fall back to default icon-color when drawing SDF --- src/stylefunction.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/stylefunction.js b/src/stylefunction.js index 9a86c1c7..1787b361 100644 --- a/src/stylefunction.js +++ b/src/stylefunction.js @@ -950,7 +950,11 @@ export function stylefunction( if (haloWidth) { if (spriteImageData.sdf) { img = drawIconHalo( - drawSDF(spriteImage, spriteImageData, iconColor), + drawSDF( + spriteImage, + spriteImageData, + iconColor || [0, 0, 0, 1], + ), { x: 0, y: 0,