bin scripts: compare against null, not undefined

This commit is contained in:
Richard Hansen 2021-01-08 17:47:38 -05:00 committed by John McLear
parent 5bcd6f44a5
commit f03c4bd7f7
3 changed files with 7 additions and 9 deletions

View file

@ -55,9 +55,7 @@ npm.load({}, async () => {
const revision = await db.get(`pad:${padId}:revs:${revNum}`);
// check if there is a atext in the keyRevisions
if (~keyRevisions.indexOf(revNum) &&
(revision === undefined ||
revision.meta === undefined ||
revision.meta.atext === undefined)) {
(revision == null || revision.meta == null || revision.meta.atext == null)) {
console.error(`No atext in key revision ${revNum}`);
continue;
}