Skip to content

Commit b367303

Browse files
committed
ensure onGet fails without data in #2059
1 parent f6caa2c commit b367303

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/background/sync-manager.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ export async function syncNow() {
181181

182182
function initController() {
183183
return dbToCloud({
184-
onGet: _id => getByUuid(_id) || uuidIndex.custom[_id],
184+
onGet: _id => getByUuid(_id) || uuidIndex.custom[_id]
185+
|| Promise.reject('No such style UUID: ' + _id),
185186
async onPut(doc) {
186187
if (!doc) return; // TODO: delete it?
187188
const id = uuidIndex.get(doc._id);

0 commit comments

Comments
 (0)