mapping, check against undefined

This commit is contained in:
jrkb 2023-10-24 09:02:43 +02:00
parent 2d55ef11b0
commit dc6e668d0c

View file

@ -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(() => {