fix(front): tabs - no more infinite loop (lesson: js can't compare objects)
This commit is contained in:
		
							parent
							
								
									38d3eb74ff
								
							
						
					
					
						commit
						d9f3c208f2
					
				| 
						 | 
					@ -17,7 +17,7 @@ const { currentTitle, tabs } = inject(TABS_INJECTION_KEY, {
 | 
				
			||||||
  tabs: []
 | 
					  tabs: []
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
whenever(() => !tabs.includes(props), () => {
 | 
					whenever(() => !tabs.some(tab => props.title === tab.title), () => {
 | 
				
			||||||
  tabs.push(props)
 | 
					  tabs.push(props)
 | 
				
			||||||
}, { immediate: true })
 | 
					}, { immediate: true })
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue