mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
server-ts: Fix undefined in ws
This commit is contained in:
parent
aff1c30557
commit
9f6a8dc75c
@ -29,10 +29,10 @@ let lastSyncedPush: number | null = null;
|
|||||||
interface Message {
|
interface Message {
|
||||||
type: string;
|
type: string;
|
||||||
data?: {
|
data?: {
|
||||||
lastSyncedPush?: number,
|
lastSyncedPush?: number | null,
|
||||||
entityChanges?: any[]
|
entityChanges?: any[]
|
||||||
},
|
},
|
||||||
lastSyncedPush?: number,
|
lastSyncedPush?: number | null,
|
||||||
|
|
||||||
progressCount?: number;
|
progressCount?: number;
|
||||||
taskId?: string;
|
taskId?: string;
|
||||||
@ -222,7 +222,7 @@ function sendPing(client: WebSocket, entityChangeIds = []) {
|
|||||||
sendMessage(client, {
|
sendMessage(client, {
|
||||||
type: 'frontend-update',
|
type: 'frontend-update',
|
||||||
data: {
|
data: {
|
||||||
lastSyncedPush: lastSyncedPush || undefined,
|
lastSyncedPush,
|
||||||
entityChanges
|
entityChanges
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -237,19 +237,19 @@ function sendTransactionEntityChangesToAllClients() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function syncPullInProgress() {
|
function syncPullInProgress() {
|
||||||
sendMessageToAllClients({ type: 'sync-pull-in-progress', lastSyncedPush: lastSyncedPush || undefined });
|
sendMessageToAllClients({ type: 'sync-pull-in-progress', lastSyncedPush });
|
||||||
}
|
}
|
||||||
|
|
||||||
function syncPushInProgress() {
|
function syncPushInProgress() {
|
||||||
sendMessageToAllClients({ type: 'sync-push-in-progress', lastSyncedPush: lastSyncedPush || undefined });
|
sendMessageToAllClients({ type: 'sync-push-in-progress', lastSyncedPush });
|
||||||
}
|
}
|
||||||
|
|
||||||
function syncFinished() {
|
function syncFinished() {
|
||||||
sendMessageToAllClients({ type: 'sync-finished', lastSyncedPush: lastSyncedPush || undefined });
|
sendMessageToAllClients({ type: 'sync-finished', lastSyncedPush });
|
||||||
}
|
}
|
||||||
|
|
||||||
function syncFailed() {
|
function syncFailed() {
|
||||||
sendMessageToAllClients({ type: 'sync-failed', lastSyncedPush: lastSyncedPush || undefined });
|
sendMessageToAllClients({ type: 'sync-failed', lastSyncedPush });
|
||||||
}
|
}
|
||||||
|
|
||||||
function reloadFrontend(reason: string) {
|
function reloadFrontend(reason: string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user