GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: fix poroject.onSimulatorHostReady in workspace mode · DBvc/lowcode-engine@bf5fece

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • designer/src/project
      • project.ts
    • shell/src/api
      • project.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/designer/src/project/project.ts‎

Copy file name to clipboardExpand all lines: packages/designer/src/project/project.ts
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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);
Collapse file

‎packages/shell/src/api/project.ts‎

Copy file name to clipboardExpand all lines: packages/shell/src/api/project.ts
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.