Cast to number

This commit is contained in:
aditya.chandel
2025-01-17 19:34:30 -07:00
parent a8c3e346e3
commit 0940fcbbeb
@@ -165,12 +165,12 @@ export class EpubViewerComponent implements OnInit, OnDestroy {
} }
increaseFontSize(): void { increaseFontSize(): void {
this.fontSize = Math.min(this.fontSize + 10, FALLBACK_EPUB_SETTINGS.maxFontSize); this.fontSize = Math.min(Number(this.fontSize) + 10, FALLBACK_EPUB_SETTINGS.maxFontSize);
this.updateFontSize(); this.updateFontSize();
} }
decreaseFontSize(): void { decreaseFontSize(): void {
this.fontSize = Math.max(this.fontSize - 10, FALLBACK_EPUB_SETTINGS.minFontSize); this.fontSize = Math.max(Number(this.fontSize) - 10, FALLBACK_EPUB_SETTINGS.minFontSize);
this.updateFontSize(); this.updateFontSize();
} }