Refactoring

This commit is contained in:
Julia Radzhabova 2022-10-12 18:40:35 +03:00
parent 8d28f72669
commit 9feabc6ac3
2 changed files with 2 additions and 2 deletions

View file

@ -467,7 +467,7 @@ define([
Common.Utils.InternalSettings.set("de-settings-livecomment", value);
var resolved = Common.localStorage.getBool("de-settings-resolvedcomment");
Common.Utils.InternalSettings.set("de-settings-resolvedcomment", resolved);
if (this.mode.canViewComments && this.leftMenu.panelComments.isVisible())
if (this.mode.canViewComments && this.leftMenu.panelComments && this.leftMenu.panelComments.isVisible())
value = resolved = true;
(value) ? this.api.asc_showComments(resolved) : this.api.asc_hideComments();
this.getApplication().getController('Common.Controllers.ReviewChanges').commentsShowHide(value ? 'show' : 'hide');

View file

@ -429,7 +429,7 @@ define([
var resolved = Common.localStorage.getBool("sse-settings-resolvedcomment");
Common.Utils.InternalSettings.set("sse-settings-resolvedcomment", resolved);
if (this.mode.canViewComments && this.leftMenu.panelComments.isVisible())
if (this.mode.canViewComments && this.leftMenu.panelComments && this.leftMenu.panelComments.isVisible())
value = resolved = true;
(value) ? this.api.asc_showComments(resolved) : this.api.asc_hideComments();
this.getApplication().getController('Common.Controllers.ReviewChanges').commentsShowHide(value ? 'show' : 'hide');