Skip to content

Commit 6b15a12

Browse files
Firetawnyowlnekufa
authored andcommitted
refactor
1 parent fdf1fe8 commit 6b15a12

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Space.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ public function castIndex(array $fields): ?array
9595

9696
foreach ($this->indexes as $index) {
9797
$check = false;
98+
$partialIndexFields = array_slice($index['fields'], 0, count($fields));
9899
foreach ($fields as $field) {
99-
if (in_array($field, array_slice($index['fields'], 0, count($fields)))) {
100+
if (in_array($field, $partialIndexFields)) {
100101
$check = true;
101102
} else {
102103
$check = false;

0 commit comments

Comments
 (0)