mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:17:08 +00:00
Do not fail if old / new missing from notifications.
The server will actually remove those when the notification would exceed a certain size, so it's expected that those might be null.
This commit is contained in:
@@ -33,17 +33,14 @@ function old_processServerEvent({state, getters, commit, dispatch}, [message]) {
|
||||
if (message.payload.operation == "INSERT") {
|
||||
if (message.payload.new == null) {
|
||||
console.warn("Expected payload.new to be non-null");
|
||||
return;
|
||||
}
|
||||
} else if (message.payload.operation == "UPDATE") {
|
||||
if (message.payload.old == null || message.payload.new == null) {
|
||||
console.warn("Expected payload.old and paylaod.new to be non-null");
|
||||
return;
|
||||
}
|
||||
} else if (message.payload.operation == "DELETE") {
|
||||
if (message.payload.old == null) {
|
||||
console.warn("Expected payload.old to be non-null");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
console.warn(`Unrecognised operation: ${message.payload.operation}`);
|
||||
|
||||
Reference in New Issue
Block a user