Skip to content

Commit

Permalink
Removing circular dependency
Browse files Browse the repository at this point in the history
Resolve: neutralinojs#88

there is a circular dependency between `src/ws/websocket.ts`
and `src/api/extensions.ts`

```
Circular dependency: src/ws/websocket.ts -> src/api/extensions.ts -> src/ws/websocket.ts

```
removing dependency from websocket.ts
  • Loading branch information
Kanai2003 committed Feb 26, 2024
1 parent dcfab68 commit 5d6af51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/ws/websocket.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as extensions from '../api/extensions';
import * as events from '../browser/events';
import { base64ToBytesArray } from '../helpers';

Expand Down Expand Up @@ -59,7 +58,7 @@ function registerLibraryEvents() {
return;
}

let stats = await extensions.getStats();
let stats = await sendMessage('extensions.getStats');
for(let extension of stats.connected) {
events.dispatch('extensionReady', extension);
}
Expand Down

0 comments on commit 5d6af51

Please sign in to comment.