Skip to content

Commit 8f8ec09

Browse files
committed
fix: emit prepare_ready_event only once and only for the correct platform
1 parent fcdb969 commit 8f8ec09

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/controllers/prepare-controller.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ export class PrepareController extends EventEmitter {
102102
private async startJSWatcherWithPrepare(platformData: IPlatformData, projectData: IProjectData, prepareData: IPrepareData): Promise<void> {
103103
if (!this.watchersData[projectData.projectDir][platformData.platformNameLowerCase].webpackCompilerProcess) {
104104
this.$webpackCompilerService.on(WEBPACK_COMPILATION_COMPLETE, data => {
105-
this.emitPrepareEvent({ ...data, hasNativeChanges: false });
105+
if (data.platform.toLowerCase() === platformData.platformNameLowerCase) {
106+
this.emitPrepareEvent({ ...data, hasNativeChanges: false });
107+
}
106108
});
107109

108110
const childProcess = await this.$webpackCompilerService.compileWithWatch(platformData, projectData, prepareData);

0 commit comments

Comments
 (0)