Skip to content

Commit fc6f41b

Browse files
committed
исправлена инициализация индекса по замечанию
1 parent 9a26c02 commit fc6f41b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/OneScript.StandardLibrary/Collections/Indexes/CollectionIndex.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ public class CollectionIndex : AutoCollectionContext<CollectionIndex, IValue>
2626

2727
public CollectionIndex(IIndexCollectionSource source, IEnumerable<IValue> fields)
2828
{
29-
_source = source;
30-
foreach (var value in _source)
31-
{
32-
ElementAdded(value);
33-
}
34-
3529
foreach (var field in fields)
3630
{
3731
if (field is ValueTable.ValueTableColumn column)
3832
column.IsIndexable = true;
3933
_fields.Add(field);
4034
}
35+
36+
_source = source;
37+
foreach (var value in _source)
38+
{
39+
ElementAdded(value);
40+
}
4141
}
4242

4343
internal bool CanBeUsedFor(IEnumerable<IValue> searchFields)

0 commit comments

Comments
 (0)