Skip to content

Commit

Permalink
Hotfix GLSPDiagramServer
Browse files Browse the repository at this point in the history
  • Loading branch information
tortmayr committed Aug 25, 2020
1 parent bcb2940 commit cd80fce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/model-source/glsp-diagram-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ export class GLSPDiagramServer extends DiagramServer implements SourceUriAware {
protected _glspClient?: GLSPClient;
protected ready = false;

async connect(client: GLSPClient) {
async connect(client: GLSPClient): Promise<GLSPClient> {
await client.start();
client.onActionMessage(message => this.messageReceived(message));
this._glspClient = client;
return this._glspClient;
}

public get glspClient(): GLSPClient | undefined {
Expand All @@ -87,7 +88,8 @@ export class GLSPDiagramServer extends DiagramServer implements SourceUriAware {

initialize(registry: ActionHandlerRegistry): void {
registerDefaultGLSPServerActions(registry, this);
this.clientId = this.viewerOptions.baseDiv;
if (!this.clientId)
this.clientId = this.viewerOptions.baseDiv;
}

handle(action: Action): void | ICommand | Action {
Expand Down

0 comments on commit cd80fce

Please sign in to comment.