Fix type error with sheet templates

pull/1/head
yflory 4 years ago
parent 676178c0bb
commit dcd6c15dc9

@ -861,7 +861,7 @@ define([
var handleNewLocks = function (o, n) { var handleNewLocks = function (o, n) {
var hasNew = false; var hasNew = false;
// Check if we have at least one new lock // 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 if (typeof(n[id]) !== "object") { return; } // Ignore old format
// n[id] = { uid: lock, uid2: lock2 }; // n[id] = { uid: lock, uid2: lock2 };
return Object.keys(n[id]).some(function (uid) { return Object.keys(n[id]).some(function (uid) {
@ -873,7 +873,7 @@ define([
}); });
}); });
// Remove old locks // Remove old locks
Object.keys(o).forEach(function (id) { Object.keys(o || {}).forEach(function (id) {
if (typeof(o[id]) !== "object") { return; } // Ignore old format if (typeof(o[id]) !== "object") { return; } // Ignore old format
Object.keys(o[id]).forEach(function (uid) { Object.keys(o[id]).forEach(function (uid) {
// Removed lock // Removed lock

Loading…
Cancel
Save