mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-11-04 08:20:58 +00:00 
			
		
		
		
	Fix: handle service object not found
This commit is contained in:
		
							parent
							
								
									6ae351b2ba
								
							
						
					
					
						commit
						9c5521ba35
					
				@ -19,7 +19,7 @@ export default function Container({ error = false, children, service }) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  let visibleChildren = childrenArray;
 | 
					  let visibleChildren = childrenArray;
 | 
				
			||||||
  let fields = service?.widget?.fields;
 | 
					  let fields = service?.widget?.fields;
 | 
				
			||||||
  if (typeof service.widget.fields === 'string') fields = JSON.parse(service.widget.fields);
 | 
					  if (typeof fields === 'string') fields = JSON.parse(service.widget.fields);
 | 
				
			||||||
  const type = service?.widget?.type;
 | 
					  const type = service?.widget?.type;
 | 
				
			||||||
  if (fields && type) {
 | 
					  if (fields && type) {
 | 
				
			||||||
    // if the field contains a "." then it most likely contains a common loc value
 | 
					    // if the field contains a "." then it most likely contains a common loc value
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user