From f8fdecaa2dbb16a6727f67732f72e2b85dcc37ab Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 13 May 2025 17:40:04 +0530 Subject: [PATCH] made the code a bit simpler --- app/controllers/api/databases.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index a56e0a05df..b98c5f0215 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -2901,9 +2901,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') $lengths[$i] ??= null; if ($attributeArray === true) { - if ($lengths[$i] === null) { - $lengths[$i] = Database::ARRAY_INDEX_LENGTH; - } + $lengths[$i] ??= Database::ARRAY_INDEX_LENGTH; $orders[$i] = null; } }