forked from CIT/Vmeda.Online
		
	MOBILE-3213 text: Fix check html is blank
This commit is contained in:
		
							parent
							
								
									34b6ab1fe1
								
							
						
					
					
						commit
						7cfb0a8c9d
					
				| @ -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); | ||||
|  | ||||
| @ -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; | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user