mirror of https://github.com/xwiki-labs/cryptpad
Fix type error with sheet templates
This commit is contained in:
parent
676178c0bb
commit
dcd6c15dc9
|
@ -861,7 +861,7 @@ define([
|
|||
var handleNewLocks = function (o, n) {
|
||||
var hasNew = false;
|
||||
// Check if we have at least one new lock
|
||||
Object.keys(n).some(function (id) {
|
||||
Object.keys(n || {}).some(function (id) {
|
||||
if (typeof(n[id]) !== "object") { return; } // Ignore old format
|
||||
// n[id] = { uid: lock, uid2: lock2 };
|
||||
return Object.keys(n[id]).some(function (uid) {
|
||||
|
@ -873,7 +873,7 @@ define([
|
|||
});
|
||||
});
|
||||
// Remove old locks
|
||||
Object.keys(o).forEach(function (id) {
|
||||
Object.keys(o || {}).forEach(function (id) {
|
||||
if (typeof(o[id]) !== "object") { return; } // Ignore old format
|
||||
Object.keys(o[id]).forEach(function (uid) {
|
||||
// Removed lock
|
||||
|
|
Loading…
Reference in New Issue