diff --git a/lib/layer/decorate.mjs b/lib/layer/decorate.mjs index 6d79a10d4..a52c589ee 100644 --- a/lib/layer/decorate.mjs +++ b/lib/layer/decorate.mjs @@ -25,7 +25,7 @@ The layer object to be decorated. export default async function decorate(layer) { // Decorate layer format methods. - await mapp.layer.formats[layer.format](layer); + await mapp.layer.formats[layer.format]?.(layer); // If layer does not exist, return. if (!layer.L) return;