From d2ba0c7a9f915a03f07e8205b2e705e7603ae422 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Tue, 2 Feb 2021 13:15:09 -0800 Subject: [PATCH] Fix hotpatching --- lib/process-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/process-manager.ts b/lib/process-manager.ts index 1cdc2bc672..57ddb3218c 100644 --- a/lib/process-manager.ts +++ b/lib/process-manager.ts @@ -453,7 +453,7 @@ export abstract class ProcessManager if (!process) return; this.destroyProcess(process); const processIndex = this.processes.indexOf(process); - if (!processIndex) throw new Error('Process inactive'); + if (processIndex < 0) throw new Error('Process inactive'); this.processes.splice(this.processes.indexOf(process), 1); this.releasingProcesses.push(process);