mirror of
				https://github.com/Tencent/tmagic-editor.git
				synced 2025-11-04 18:52:18 +08:00 
			
		
		
		
	fix(editor): 编辑器销毁不应该移除依赖收集任务的事件监听
This commit is contained in:
		
							parent
							
								
									098351bb21
								
							
						
					
					
						commit
						6e2b5aea47
					
				@ -191,7 +191,6 @@ class Dep extends BaseService {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public reset() {
 | 
			
		||||
    this.idleTask.removeAllListeners();
 | 
			
		||||
    this.idleTask.clearTasks();
 | 
			
		||||
 | 
			
		||||
    for (const type of Object.keys(this.watcher.getTargetsList())) {
 | 
			
		||||
@ -202,6 +201,8 @@ class Dep extends BaseService {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public destroy() {
 | 
			
		||||
    this.idleTask.removeAllListeners();
 | 
			
		||||
 | 
			
		||||
    this.removeAllListeners();
 | 
			
		||||
    this.reset();
 | 
			
		||||
    this.removeAllPlugins();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user