Skip to content

Commit

Permalink
CHE-10403. Fix 'onOpen' websocket handlers
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
  • Loading branch information
RomanNikitenko committed Sep 11, 2018
1 parent 15072ae commit 0c0f69d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dashboard/src/components/api/json-rpc/websocket-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class WebsocketClient implements ICommunicationClient {

this.websocketStream.onOpen(() => {
const event: communicationClientEvent = 'open';
if (this.handlers[event] && this.handlers[event].length === 0) {
if (this.handlers[event] && this.handlers[event].length > 0) {
this.handlers[event].forEach((handler: Function) => handler() );
}

Expand Down

0 comments on commit 0c0f69d

Please sign in to comment.