Fix type error with sheet templates

This commit is contained in:
yflory 2021-03-29 13:35:40 +02:00
parent 676178c0bb
commit dcd6c15dc9
1 changed files with 2 additions and 2 deletions

View File

@ -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