From c7fd4c4e0ad3a5eeb114b7b9e5a7f0a2ed791ba9 Mon Sep 17 00:00:00 2001 From: Andrii Barvynko Date: Fri, 26 Mar 2021 12:03:39 +0200 Subject: [PATCH] Allow to have one row matrix in CheckMatrix --- src/utils/array/matrix/CheckMatrix.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/array/matrix/CheckMatrix.js b/src/utils/array/matrix/CheckMatrix.js index bea1e7fd1..b2b078dae 100644 --- a/src/utils/array/matrix/CheckMatrix.js +++ b/src/utils/array/matrix/CheckMatrix.js @@ -8,7 +8,7 @@ * Checks if an array can be used as a matrix. * * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) - * have the same length. There must be at least two rows. This is an example matrix: + * have the same length. This is an example matrix: * * ``` * [ @@ -33,7 +33,7 @@ */ var CheckMatrix = function (matrix) { - if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0])) + if (!Array.isArray(matrix) || !Array.isArray(matrix[0])) { return false; }