If the database hasn't been initialized (new install?) don't attempt to update our last synced id, as there is no db to grab it from (prevents running the server as a fresh install completely) (#1797)

Co-authored-by: Mark <mark@mhack.io>
This commit is contained in:
bavis-m 2021-03-27 12:30:40 -07:00 committed by GitHub
parent a254199746
commit 744ed27d91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -391,8 +391,11 @@ sqlInit.dbReady.then(() => {
setTimeout(cls.wrap(sync), 5000);
});
// called just so ws.setLastSyncedPush() is called
getLastSyncedPush();
if (sqlInit.isDbInitialized())
{
// called just so ws.setLastSyncedPush() is called
getLastSyncedPush();
}
module.exports = {
sync,