From af40e140f9c9f22d029fa94bf680b5f0609639cf Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 16 Aug 2018 16:59:52 +0200 Subject: [PATCH] safety net for call of undefined function in mergeDrive --- www/common/mergeDrive.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/common/mergeDrive.js b/www/common/mergeDrive.js index a633489b2..396798d24 100644 --- a/www/common/mergeDrive.js +++ b/www/common/mergeDrive.js @@ -70,7 +70,12 @@ define([ Realtime.whenRealtimeSyncs(proxyData.realtime, cb); } }; - oldFo.migrate(onMigrated); + if (oldFo && typeof(oldFo.migrate) === 'function') { + oldFo.migrate(onMigrated); + } else { + console.log('oldFo.migrate is not a function'); + onMigrated(); + } return; } if (typeof(cb) === "function") { cb(); }