Call the callback if we can't parse the local Drive to import it
This commit is contained in:
parent
36a2eab3c3
commit
16e5788011
@ -138,7 +138,15 @@ define([
|
|||||||
var todo = function (err, doc) {
|
var todo = function (err, doc) {
|
||||||
if (err) { console.error("Cannot migrate recent pads", err); return; }
|
if (err) { console.error("Cannot migrate recent pads", err); return; }
|
||||||
var parsed;
|
var parsed;
|
||||||
try { parsed = JSON.parse(doc); } catch (e) { console.error("Cannot parsed recent pads", e); return; }
|
if (!doc) {
|
||||||
|
if (typeof(cb) === "function") { cb(); }
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try { parsed = JSON.parse(doc); } catch (e) {
|
||||||
|
if (typeof(cb) === "function") { cb(); }
|
||||||
|
console.error("Cannot parsed recent pads", e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (parsed) {
|
if (parsed) {
|
||||||
//merge(proxy, parsed, true);
|
//merge(proxy, parsed, true);
|
||||||
var oldFo = FO.init(parsed.drive, {
|
var oldFo = FO.init(parsed.drive, {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user