Skip to content

Commit b314554

Browse files
committed
chore: refactor after merge
1 parent 330f04f commit b314554

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ui-pager/index.ios.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,18 +1118,18 @@ class UICollectionViewFlowLinearLayoutImpl extends UICollectionViewFlowLayout {
11181118
const originalLayoutAttribute = super.layoutAttributesForElementsInRect(rect);
11191119
const visibleLayoutAttributes = NSMutableArray.alloc().init();
11201120
if (owner && owner.transformers) {
1121-
const transformsArray = owner.transformers.split(' ');
1121+
const transformsArray = owner.transformers
1122+
.split(' ')
1123+
.map((s) => Pager.mRegisteredTransformers[s])
1124+
.filter((s) => !!s);
11221125
if (transformsArray.length) {
11231126
const collectionView = this.collectionView;
11241127
const count = originalLayoutAttribute.count;
11251128
for (let i = 0; i < count; i++) {
11261129
const attributes = originalLayoutAttribute.objectAtIndex(i);
11271130
visibleLayoutAttributes.addObject(attributes);
11281131
for (const transformer of transformsArray) {
1129-
const nativeTransformer = Pager.mRegisteredTransformers[transformer];
1130-
if (nativeTransformer) {
1131-
nativeTransformer(i, attributes, owner, collectionView);
1132-
}
1132+
transformer(i, attributes, owner, collectionView);
11331133
}
11341134
}
11351135
}

0 commit comments

Comments
 (0)