From 710c33ad3a0cc9d1b4309eebc832cb0c1d366273 Mon Sep 17 00:00:00 2001 From: Jon Quach Date: Tue, 24 Mar 2020 09:09:37 -0400 Subject: [PATCH] Update packages/components/src/alignment-control/utils.js Co-Authored-By: Zebulan Stanphill --- packages/components/src/alignment-control/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/src/alignment-control/utils.js b/packages/components/src/alignment-control/utils.js index 80c9230d50289f..534bba6557cbe1 100644 --- a/packages/components/src/alignment-control/utils.js +++ b/packages/components/src/alignment-control/utils.js @@ -165,8 +165,8 @@ export function getCoordsFromIndex( index = 0 ) { export function getIndexFromCoords( coords, fallback = 0 ) { const [ x, y ] = coords; const exists = - ! isUndefined( ALIGNMENT_MATRIX[ x ] ) && - ! isUndefined( ALIGNMENT_MATRIX[ x ][ y ] ); + ALIGNMENT_MATRIX[ x ] !== undefined && + ALIGNMENT_MATRIX[ x ][ y ] !== undefined; return exists ? ALIGNMENT_MATRIX[ x ][ y ] : fallback; }