MOBILE-4272 rte: Fix contentChanged event types
parent
aeb12fa472
commit
a07ae84f54
|
@ -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.
|
||||
|
|
|
@ -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 ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue