From aba16e1f382c8c646dcbe4a946a39f52c25e7679 Mon Sep 17 00:00:00 2001 From: "Bence A. Toth" <5611525+bence-toth@users.noreply.github.com> Date: Sun, 16 Aug 2020 23:55:30 +0200 Subject: [PATCH] Removed optional chaining operator --- triangle-mosaic/triangle-mosaic.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/triangle-mosaic/triangle-mosaic.js b/triangle-mosaic/triangle-mosaic.js index 2092e1c..86360c7 100644 --- a/triangle-mosaic/triangle-mosaic.js +++ b/triangle-mosaic/triangle-mosaic.js @@ -584,16 +584,16 @@ class TriangleMosaic { if (shapeFuzz !== undefined) { this.shapeFuzz = shapeFuzz } - if (colorFuzz?.hue !== undefined) { + if (colorFuzz && (colorFuzz.hue !== undefined)) { this.colorFuzz.hue = colorFuzz.hue } - if (colorFuzz?.saturation !== undefined) { + if (colorFuzz && (colorFuzz.saturation !== undefined)) { this.colorFuzz.saturation = colorFuzz.saturation } - if (colorFuzz?.lightness !== undefined) { + if (colorFuzz && (colorFuzz.lightness !== undefined)) { this.colorFuzz.lightness = colorFuzz.lightness } - if (colorFuzz?.alpha !== undefined) { + if (colorFuzz && (colorFuzz.alpha !== undefined)) { this.colorFuzz.alpha = colorFuzz.alpha } if (coloring !== undefined) {