Skip to content

Commit 02206cf

Browse files
committed
refactor(expansion): avoid unnecessary spacing check
The check where `expanded` equals to `false`, and where the value of the `_getExpandedState` method is compared to `default` will always evaluate to `false`. This is because the method return value does not have any overlap with `default`. Hence the check is unnecessary. This seems to be a leftover from f9bd5d4.
1 parent 5f447c1 commit 02206cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/material/expansion/expansion-panel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export class MatExpansionPanel extends CdkAccordionItem implements AfterContentI
185185
// We don't need to subscribe to the `stateChanges` of the parent accordion because each time
186186
// the [displayMode] input changes, the change detection will also cover the host bindings
187187
// of this expansion panel.
188-
return (this.expanded ? this.accordion.displayMode : this._getExpandedState()) === 'default';
188+
return this.expanded && this.accordion.displayMode === 'default';
189189
}
190190
return false;
191191
}

0 commit comments

Comments
 (0)