mirror of
				https://git.unlock-music.dev/um/web.git
				synced 2025-11-04 09:23:28 +08:00 
			
		
		
		
	fix: avoid using worker in file protocol
This commit is contained in:
		
							parent
							
								
									39c7294996
								
							
						
					
					
						commit
						8fdda048f6
					
				@ -63,7 +63,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
        if (window.Worker && process.env.NODE_ENV === 'production') {
 | 
					        if (window.Worker && window.location.protocol !== "file:" && process.env.NODE_ENV === 'production') {
 | 
				
			||||||
            console.log("Using Worker Pool")
 | 
					            console.log("Using Worker Pool")
 | 
				
			||||||
            this.queue = Pool(
 | 
					            this.queue = Pool(
 | 
				
			||||||
                () => spawn(new Worker('@/utils/worker.ts')),
 | 
					                () => spawn(new Worker('@/utils/worker.ts')),
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user