mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-01 12:18:51 +00:00
fix: roll back rejected marker writes atomically
Issue: #442 User-Visible: yes
This commit is contained in:
@@ -51,8 +51,7 @@ export function rollbackOptimistic<T>(
|
||||
): boolean {
|
||||
const current = host._serverCfg;
|
||||
if (!current || host._cfgRev !== attempt.revision
|
||||
|| (current !== attempt.attempted
|
||||
&& fingerprint(current) !== attempt.attemptedFingerprint)) return false;
|
||||
|| fingerprint(current) !== attempt.attemptedFingerprint) return false;
|
||||
host._serverCfg = attempt.previous;
|
||||
host._cfgContentFingerprint = attempt.previousFingerprint;
|
||||
host.requestUpdate();
|
||||
|
||||
Reference in New Issue
Block a user