Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.

Commit fe5bb43

Browse files
committed
fix: zIndex prop edge case
This commit ensures the view "layer" exists before trying to set "zIndex".
1 parent b8c1913 commit fe5bb43

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

React/Views/NSView+React.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ - (NSInteger)reactZIndex
117117

118118
- (void)setReactZIndex:(NSInteger)reactZIndex
119119
{
120+
[self ensureLayerExists];
120121
self.layer.zPosition = reactZIndex;
121122
}
122123

0 commit comments

Comments
 (0)