[Glitch] Fix Chrome issue with sizes="0px"
This commit is contained in:
		
							parent
							
								
									58c19ac07c
								
							
						
					
					
						commit
						a68e7db2fb
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -142,7 +142,7 @@ class Item extends React.PureComponent {
 | 
			
		|||
      const hasSize = typeof originalWidth === 'number' && typeof previewWidth === 'number';
 | 
			
		||||
 | 
			
		||||
      const srcSet = hasSize ? `${originalUrl} ${originalWidth}w, ${previewUrl} ${previewWidth}w` : null;
 | 
			
		||||
      const sizes  = hasSize ? `${displayWidth * (width / 100)}px` : null;
 | 
			
		||||
      const sizes  = hasSize && (displayWidth > 0) ? `${displayWidth * (width / 100)}px` : null;
 | 
			
		||||
 | 
			
		||||
      const focusX = attachment.getIn(['meta', 'focus', 'x']) || 0;
 | 
			
		||||
      const focusY = attachment.getIn(['meta', 'focus', 'y']) || 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue