mirror of
				https://github.com/cinnyapp/cinny.git
				synced 2025-11-04 06:20:28 +03:00 
			
		
		
		
	Fix crash when img without src tag (#1731)
This commit is contained in:
		
							parent
							
								
									ec65b98874
								
							
						
					
					
						commit
						215537a261
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -107,7 +107,7 @@ const transformATag: Transformer = (tagName, attribs) => ({
 | 
			
		|||
 | 
			
		||||
const transformImgTag: Transformer = (tagName, attribs) => {
 | 
			
		||||
  const { src } = attribs;
 | 
			
		||||
  if (src.startsWith('mxc://') === false) {
 | 
			
		||||
  if (typeof src === 'string' && src.startsWith('mxc://') === false) {
 | 
			
		||||
    return {
 | 
			
		||||
      tagName: 'a',
 | 
			
		||||
      attribs: {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue