fix(button): fill can be set to undefined (#26339)

resolves #25886
This commit is contained in:
Liam DeBeasi
2022-11-22 13:46:17 -05:00
committed by GitHub
parent 7ae8117284
commit 2fe23d9d46
2 changed files with 24 additions and 1 deletions

View File

@ -272,7 +272,11 @@ export class Button implements ComponentInterface, AnchorInterface, ButtonInterf
target,
};
let fill = this.fill;
if (fill === undefined) {
/**
* We check both undefined and null to
* work around https://github.com/ionic-team/stencil/issues/3586.
*/
if (fill == null) {
fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
}
return (