Skip to content

Commit

Permalink
[Chips] Add safe guard to prevent setting visibleAreaInsets using sam…
Browse files Browse the repository at this point in the history
…e values.

PiperOrigin-RevId: 316692084
  • Loading branch information
wenyuzhang666 authored and material-automation committed Jun 16, 2020
1 parent ef53fab commit 22f92d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/Chips/src/MDCChipView.m
Expand Up @@ -712,6 +712,10 @@ - (BOOL)pointInside:(CGPoint)point withEvent:(__unused UIEvent *)event {
#pragma mark - Visible area

- (void)setVisibleAreaInsets:(UIEdgeInsets)visibleAreaInsets {
if (UIEdgeInsetsEqualToEdgeInsets(visibleAreaInsets, _visibleAreaInsets)) {
return;
}

_visibleAreaInsets = visibleAreaInsets;

if (UIEdgeInsetsEqualToEdgeInsets(visibleAreaInsets, UIEdgeInsetsZero)) {
Expand Down

0 comments on commit 22f92d4

Please sign in to comment.