File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -369,6 +369,10 @@ export class Project implements IProject {
369369 }
370370
371371 onSimulatorReady ( fn : ( args : any ) => void ) : ( ) => void {
372+ if ( this . _simulator ) {
373+ fn ( this . _simulator ) ;
374+ return ( ) => { } ;
375+ }
372376 this . emitter . on ( 'lowcode_engine_simulator_ready' , fn ) ;
373377 return ( ) => {
374378 this . emitter . removeListener ( 'lowcode_engine_simulator_ready' , fn ) ;
Original file line number Diff line number Diff line change @@ -192,12 +192,8 @@ export class Project implements IPublicApiProject {
192192 */
193193 onSimulatorHostReady ( fn : ( host : IPublicApiSimulatorHost ) => void ) : IPublicTypeDisposable {
194194 const offFn = this [ projectSymbol ] . onSimulatorReady ( ( simulator : BuiltinSimulatorHost ) => {
195- this [ simulatorHostSymbol ] = simulator ;
196195 fn ( SimulatorHost . create ( simulator ) ! ) ;
197196 } ) ;
198- if ( this [ simulatorHostSymbol ] ) {
199- fn ( SimulatorHost . create ( this [ simulatorHostSymbol ] ) ! ) ;
200- }
201197 return offFn ;
202198 }
203199
You can’t perform that action at this time.
0 commit comments