only migrate keys which don't already exist

This commit is contained in:
ansuz 2017-01-09 17:35:58 +01:00
parent 1c3f1a15cd
commit 74a12f50ac
1 changed files with 11 additions and 4 deletions

View File

@ -364,12 +364,19 @@ define([
if (proxy && proxy.version === 1) { return; }
console.log("Configuring proxy schema...");
proxy.info = schema.info;
proxy.table = schema.table;
proxy.info = proxy.info || schema.info;
Object.keys(schema.info).forEach(function (k) {
if (!proxy.info[k]) { proxy.info[k] = schema.info[k]; }
});
proxy.table = proxy.table || schema.table;
Object.keys(schema.table).forEach(function (k) {
if (!proxy.table[k]) { proxy.table[k] = schema.table[k]; }
});
proxy.version = 1;
};
/*
*/
@ -645,7 +652,7 @@ define([
suggestName: suggestName
},
ifrw: window,
common: Cryptpad
common: Cryptpad,
};
var toolbar = info.realtime.toolbar = Toolbar.create(APP.$bar, info.myID, info.realtime, info.getLag, userList, config);