GristWSConnection: use settings instead of "window" object

The reference to "window" would unexpectedly break Node-based tests
where a client stays connected long enough to send a heartbeat.

GristWSSettings.getPageUrl seems explicitly made for this.
pull/859/head
Jonathan Perret 3 months ago
parent a2a5caf85b
commit 72c619f2f6

@ -317,7 +317,7 @@ export class GristWSConnection extends Disposable {
private _sendHeartbeat() {
this.send(JSON.stringify({
beat: 'alive',
url: G.window.location.href,
url: this._settings.getPageUrl(),
docId: this._assignmentId,
}));
}

Loading…
Cancel
Save