Skip to content

Commit

Permalink
🔀 Merge pull request #9 from T4rk1n/7-page-no-binding
Browse files Browse the repository at this point in the history
Connect websocket only if page has bindings.
  • Loading branch information
T4rk1n committed Oct 19, 2019
2 parents 9e221db + 83bf5c8 commit 29594a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Versions follow [Semantic Versioning](https://www.semver.org)

## Unreleased
### Added

- :hammer: Connect websocket only if page has bindings. [#7](https://github.com/T4rk1n/dazzler/issues/7)

## [0.1.0]
### Added

Expand Down
8 changes: 7 additions & 1 deletion src/renderer/js/components/Updater.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,13 @@ export default class Updater extends React.Component {
this.loadRequirements(
response.requirements,
response.packages
).then(() => this._connectWS());
).then(() => {
if (Object.keys(response.bindings).length) {
this._connectWS();
} else {
this.setState({ready: true});
}
});
});
}

Expand Down

0 comments on commit 29594a7

Please sign in to comment.