Fix bug when theme colors are not loaded

This commit is contained in:
Julia.Radzhabova
2025-11-07 19:03:05 +03:00
parent aa558b3484
commit 5fe18ca0c1
4 changed files with 14 additions and 9 deletions

View File

@ -3634,6 +3634,7 @@ define([
var clr;
var effectcolors = Common.Utils.ThemeColor.getEffectColors();
if (!effectcolors) return;
for (var i = 0; i < effectcolors.length; i++) {
if (typeof(picker.currentColor) == 'object' &&
clr === undefined &&
@ -3652,7 +3653,7 @@ define([
updateColors(this.toolbar.mnuFontColorPicker, 1);
if (this.toolbar.btnFontColor.currentColor===undefined || !this.toolbar.btnFontColor.currentColor.isAuto) {
this.toolbar.btnFontColor.currentColor = this.toolbar.mnuFontColorPicker.currentColor.color || this.toolbar.mnuFontColorPicker.currentColor;
this.toolbar.btnFontColor.currentColor = this.toolbar.mnuFontColorPicker.currentColor ? this.toolbar.mnuFontColorPicker.currentColor.color || this.toolbar.mnuFontColorPicker.currentColor : this.toolbar.mnuFontColorPicker.currentColor;
this.toolbar.btnFontColor.setColor(this.toolbar.btnFontColor.currentColor);
}
if (this._state.clrtext_asccolor!==undefined) {
@ -3662,7 +3663,7 @@ define([
this._state.clrtext_asccolor = undefined;
updateColors(this.toolbar.mnuParagraphColorPicker, 0);
this.toolbar.btnParagraphColor.currentColor = this.toolbar.mnuParagraphColorPicker.currentColor.color || this.toolbar.mnuParagraphColorPicker.currentColor;
this.toolbar.btnParagraphColor.currentColor = this.toolbar.mnuParagraphColorPicker.currentColor ? this.toolbar.mnuParagraphColorPicker.currentColor.color || this.toolbar.mnuParagraphColorPicker.currentColor : this.toolbar.mnuParagraphColorPicker.currentColor;
this.toolbar.btnParagraphColor.setColor(this.toolbar.btnParagraphColor.currentColor);
if (this._state.clrshd_asccolor!==undefined) {
this._state.clrback = undefined;