pre-refactor
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* auto-refresh messages from the backend can trigger page reloads.
|
||||
*/
|
||||
|
||||
import { setSubscribeFn } from './component.js';
|
||||
import { setSubscribeFn, isComponentStateMounted } from './component.js';
|
||||
|
||||
const _wsSubs = new Map();
|
||||
let _wsConn = null;
|
||||
@@ -74,7 +74,7 @@ function handleMessage(msg) {
|
||||
}
|
||||
|
||||
for (const s of _wsSubs.values()) {
|
||||
if (s.unsubscribed) continue;
|
||||
if (s.unsubscribed || !isComponentStateMounted(s.state)) continue;
|
||||
if (s.topic === '*') {
|
||||
s.loadFn(s.state);
|
||||
} else if (topics.some(t => t === s.topic || t === '*')) {
|
||||
|
||||
Reference in New Issue
Block a user