[client-sync] add assertion about Reference not cleaned up properly

This commit is contained in:
Evan Morikawa 2017-02-28 11:08:57 -08:00
parent de0e30d8dd
commit 9fd2f097b0

View file

@ -33,6 +33,9 @@ async function findOrBuildByReferences(db, message) {
});
}
if (matchingRef && !matchingRef.thread) {
throw new Error(`Reference not properly cleaned up`)
}
return matchingRef ? matchingRef.thread : emptyThread(db, {});
}