mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 09:45:37 -04:00
dmpWorker.ts: Fix check for attributes on data object
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
dd63f789f7
commit
3f87539d7d
1 changed files with 41 additions and 41 deletions
|
@ -103,7 +103,7 @@ process.on('message', function (data: Data) {
|
|||
}
|
||||
switch (data.msg) {
|
||||
case 'create patch':
|
||||
if (!data.lastDoc || !data.currDoc) {
|
||||
if (data.lastDoc === undefined || data.currDoc === undefined) {
|
||||
return logger.error('dmp worker error: not enough data on create patch')
|
||||
}
|
||||
try {
|
||||
|
@ -123,7 +123,7 @@ process.on('message', function (data: Data) {
|
|||
}
|
||||
break
|
||||
case 'get revision':
|
||||
if (!data.revisions || !data.count) {
|
||||
if (data.revisions === undefined || data.count === undefined) {
|
||||
return logger.error('dmp worker error: not enough data on get revision')
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue