Skip to content

Commit

Permalink
💫 Update: RNIWeakArray
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed May 1, 2023
1 parent 615e566 commit 5d2b2ed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ios/src_library/React Native/RNIWeak/RNIWeakArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ public class RNIWeakArray<T> {
};
};

public var array: [RNIWeakRef<T>] {
public var array: [T] {
let purgedArray = self.purgedArray;
self.rawArray = purgedArray;

return purgedArray;
return purgedArray.compactMap {
$0.synthesizedRef;
};
};

public init(initialItems: [T] = []){
Expand Down

0 comments on commit 5d2b2ed

Please sign in to comment.