mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
fix(linked-doc): typeError when content cannot be parsed
This commit is contained in:
parent
ce8364a025
commit
f3f06d833b
@ -688,7 +688,7 @@ const factory = (Sortify, UserObject, ProxyManager,
|
||||
const value = {
|
||||
checkpoints: []
|
||||
};
|
||||
let hashes = content.hashes || {}; // checkpoints
|
||||
let hashes = content?.hashes || {}; // checkpoints
|
||||
let sortedCp = Object.keys(hashes).map(Number).sort((a, b) => a-b).slice(-10);
|
||||
sortedCp.forEach(cpIdx => {
|
||||
const cpData = hashes[cpIdx];
|
||||
@ -713,7 +713,7 @@ const factory = (Sortify, UserObject, ProxyManager,
|
||||
store.modules['linked-doc'].checkCurrentDoc({
|
||||
channel: chan,
|
||||
expectedJSON: value,
|
||||
signKey64: secret.keys?.signKey
|
||||
signKey64: secret?.keys?.signKey
|
||||
}, cb);
|
||||
}, opts);
|
||||
};
|
||||
|
||||
2
www/common/worker.bundle.min.js
vendored
2
www/common/worker.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user