Skip to content

Commit 6ded2e7

Browse files
authored
fix(android): guard TextBase fontSize reset values (#11222)
1 parent 6bc5383 commit 6ded2e7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/core/ui/text-base/index.android.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,11 @@ export class TextBase extends TextBaseCommon {
421421
[fontSizeProperty.getDefault](): { nativeSize: number } {
422422
return { nativeSize: this.nativeTextViewProtected.getTextSize() };
423423
}
424-
[fontSizeProperty.setNative](value: number | { nativeSize: number }) {
424+
[fontSizeProperty.setNative](value: number | { nativeSize: number } | null | undefined) {
425+
if (value == null) {
426+
return;
427+
}
428+
425429
if (!this.formattedText || typeof value !== 'number') {
426430
if (typeof value === 'number') {
427431
this.nativeTextViewProtected.setTextSize(value);

0 commit comments

Comments
 (0)