Fix 'lock is null' error in onlyoffice apps

pull/1/head
yflory 6 years ago
parent f04ba4a3d8
commit c9450de799

@ -3717,8 +3717,9 @@ AscBrowser.convertToRetinaValue = function(value, isScale)
var bSendEnd = false;
for (var block in data["locks"]) {
if (data["locks"].hasOwnProperty(block)) {
var lock = data["locks"][block], blockTmp = (this._isExcel || this._isPresentation) ? lock["block"]["guid"] : lock["block"];
var lock = data["locks"][block];
if (lock !== null) {
var blockTmp = (this._isExcel || this._isPresentation) ? lock["block"]["guid"] : lock["block"];
this._locks[blockTmp] = {"state": 0, "user": lock["user"], "time": lock["time"], "changes": lock["changes"], "block": lock["block"]};
if (this.onLocksReleased) {
// true - lock with save

@ -3717,8 +3717,9 @@ AscBrowser.convertToRetinaValue = function(value, isScale)
var bSendEnd = false;
for (var block in data["locks"]) {
if (data["locks"].hasOwnProperty(block)) {
var lock = data["locks"][block], blockTmp = (this._isExcel || this._isPresentation) ? lock["block"]["guid"] : lock["block"];
var lock = data["locks"][block];
if (lock !== null) {
var blockTmp = (this._isExcel || this._isPresentation) ? lock["block"]["guid"] : lock["block"];
this._locks[blockTmp] = {"state": 0, "user": lock["user"], "time": lock["time"], "changes": lock["changes"], "block": lock["block"]};
if (this.onLocksReleased) {
// true - lock with save

@ -3717,8 +3717,9 @@ AscBrowser.convertToRetinaValue = function(value, isScale)
var bSendEnd = false;
for (var block in data["locks"]) {
if (data["locks"].hasOwnProperty(block)) {
var lock = data["locks"][block], blockTmp = (this._isExcel || this._isPresentation) ? lock["block"]["guid"] : lock["block"];
var lock = data["locks"][block];
if (lock !== null) {
var blockTmp = (this._isExcel || this._isPresentation) ? lock["block"]["guid"] : lock["block"];
this._locks[blockTmp] = {"state": 0, "user": lock["user"], "time": lock["time"], "changes": lock["changes"], "block": lock["block"]};
if (this.onLocksReleased) {
// true - lock with save

Loading…
Cancel
Save