fix unknown decision

This commit is contained in:
fyears 2021-11-21 22:54:31 +08:00
parent 0be19b677b
commit e82dfc1e88

View File

@ -161,8 +161,8 @@ const ensembleMixedStates = async (
r = { r = {
key: key, key: key,
exist_remote: true, exist_remote: true,
mtime_remote: backwardMapping.localMtime, mtime_remote: backwardMapping.localMtime || entry.lastModified,
size_remote: backwardMapping.localSize, size_remote: backwardMapping.localSize || entry.size,
remote_encrypted_key: remoteEncryptedKey, remote_encrypted_key: remoteEncryptedKey,
}; };
} else { } else {
@ -388,6 +388,10 @@ const getOperation = (
r.decision_branch = 11; r.decision_branch = 11;
} }
if (r.decision === "unknown") {
throw Error(`unknown decision for ${r}`);
}
return r; return r;
}; };