From dc6e668d0c04cdb127759b8371e5a58929f7c324 Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Tue, 24 Oct 2023 09:02:43 +0200 Subject: [PATCH] mapping, check against undefined --- bin/web/js/layer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/web/js/layer.js b/bin/web/js/layer.js index fa8712e..ca5be60 100644 --- a/bin/web/js/layer.js +++ b/bin/web/js/layer.js @@ -111,7 +111,11 @@ const Layer = function(tp, layerID, fontsAndAxes, autoInit = true) { range: [axes[a].minValue, axes[a].maxValue], }); if (typeof audio === 'object' && + typeof audio.getSavedMapping() === 'object' && + typeof audio.getSavedMapping()[this.id()] === 'object' && typeof audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`] === 'object' && + typeof audio.getMapping() === 'object' && + typeof audio.getMapping()[this.id()] === 'object' && typeof audio.getMapping()[this.id()][`fontVariationAxes.${axes[a].name}`] === 'object' && tp.getPanel() !== null) { doThese.push(() => {