From 9a7b2c15924d51dcb279f1bbe4e62505474a1797 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Mon, 18 Sep 2023 22:34:29 +0200 Subject: [PATCH] Remove redundant if: referenceLayerName is always set now --- src/fontra/client/core/glyph-controller.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/fontra/client/core/glyph-controller.js b/src/fontra/client/core/glyph-controller.js index a351199b6..c254e7684 100644 --- a/src/fontra/client/core/glyph-controller.js +++ b/src/fontra/client/core/glyph-controller.js @@ -241,16 +241,10 @@ export class VariableGlyphController { break; } } - if (referenceLayerName) { - this._sourceInterpolationStatus = this.sources.map((source) => { - const error = errors[referenceLayerName][source.layerName]; - return error ? { error } : {}; - }); - } else { - this._sourceInterpolationStatus = this.sources.map((source) => { - return {}; - }); - } + this._sourceInterpolationStatus = this.sources.map((source) => { + const error = errors[referenceLayerName][source.layerName]; + return error ? { error } : {}; + }); } return this._sourceInterpolationStatus; }