diff --git a/src/addon/mod/workshop/pages/edit-submission/edit-submission.ts b/src/addon/mod/workshop/pages/edit-submission/edit-submission.ts index 5c67457c5..10864c6ee 100644 --- a/src/addon/mod/workshop/pages/edit-submission/edit-submission.ts +++ b/src/addon/mod/workshop/pages/edit-submission/edit-submission.ts @@ -328,7 +328,8 @@ export class AddonModWorkshopEditSubmissionPage implements OnInit, OnDestroy { const noText = this.textUtils.htmlIsBlank(inputData.content); const noFiles = !inputData.attachmentfiles.length; - if (this.textRequired && noText || this.fileRequired && noFiles || noText && noFiles) { + + if ((this.textRequired && noText) || (this.fileRequired && noFiles) || (noText && noFiles)) { this.domUtils.showAlertTranslated('core.notice', 'addon.mod_workshop.submissionrequiredcontent'); return Promise.reject(null); diff --git a/src/providers/utils/text.ts b/src/providers/utils/text.ts index d4826c942..0f1202161 100644 --- a/src/providers/utils/text.ts +++ b/src/providers/utils/text.ts @@ -516,7 +516,7 @@ export class CoreTextUtilsProvider { this.template.innerHTML = content; - return this.template.textContent === '' && this.template.content.querySelector('img, object, hr') === null; + return this.template.content.textContent == '' && this.template.content.querySelector('img, object, hr') === null; } /**