Skip to content

Commit

Permalink
fix issue on ibireme#984
Browse files Browse the repository at this point in the history
fix issue on ibireme#984
  • Loading branch information
lyb5834 committed Oct 23, 2023
1 parent 7bd2aa4 commit 0ceaba0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions YYText/Utility/YYTextAsyncLayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ - (void)display {
#pragma mark - Private

- (void)_displayAsync:(BOOL)async {
// issue fix: https://github.com/ibireme/YYText/issues/984
if (self.bounds.size.width <= 0 || self.bounds.size.height <= 0) {
self.contents = nil;
return;
}
__strong id<YYTextAsyncLayerDelegate> delegate = (id)self.delegate;
YYTextAsyncLayerDisplayTask *task = [delegate newAsyncDisplayTask];
if (!task.display) {
Expand Down

0 comments on commit 0ceaba0

Please sign in to comment.