Skip to content

Commit

Permalink
Update packages/components/src/alignment-control/utils.js
Browse files Browse the repository at this point in the history
Co-Authored-By: Zebulan Stanphill <[email protected]>
  • Loading branch information
Jon Quach and ZebulanStanphill committed Mar 25, 2020
1 parent a5d3dbc commit 710c33a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/alignment-control/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 710c33a

Please sign in to comment.