MOBILE-4272 rte: Fix contentChanged event types

main
Noel De Martin 2023-07-25 15:38:28 +09:00
parent aeb12fa472
commit a07ae84f54
6 changed files with 10 additions and 10 deletions

View File

@ -111,7 +111,7 @@ export class AddonModAssignSubmissionOnlineTextComponent extends AddonModAssignS
*
* @param text The new text.
*/
onChange(text: string): void {
onChange(text?: string | null): void {
// Count words if needed.
if (this.wordLimitEnabled) {
// Cancel previous wait.

View File

@ -332,8 +332,8 @@ export class AddonModForumPostComponent implements OnInit, OnDestroy, OnChanges
*
* @param text The new text.
*/
onMessageChange(text: string): void {
this.formData.message = text;
onMessageChange(text?: string | null): void {
this.formData.message = text ?? '';
}
/**

View File

@ -511,8 +511,8 @@ export class AddonModForumNewDiscussionPage implements OnInit, OnDestroy, CanLea
*
* @param text The new text.
*/
onMessageChange(text: string): void {
this.newDiscussion.message = text;
onMessageChange(text?: string | null): void {
this.newDiscussion.message = text ?? '';
}
/**

View File

@ -173,8 +173,8 @@ export class AddonModGlossaryEditPage implements OnInit, CanLeave {
*
* @param text The new text.
*/
onDefinitionChange(text: string): void {
this.data.definition = text;
onDefinitionChange(text?: string | null): void {
this.data.definition = text ?? '';
}
/**

View File

@ -403,8 +403,8 @@ export class AddonModWorkshopAssessmentStrategyComponent implements OnInit, OnDe
*
* @param text The new text.
*/
onFeedbackChange(text: string): void {
this.feedbackText = text;
onFeedbackChange(text?: string | null): void {
this.feedbackText = text ?? '';
}
/**

View File

@ -332,7 +332,7 @@ export class CoreTextUtilsProvider {
* @param text Text to count.
* @returns Number of words.
*/
countWords(text: string): number {
countWords(text?: string | null): number {
if (!text || typeof text != 'string') {
return 0;
}