Skip to content

Commit

Permalink
[de] Fix crash when loading sdk with custom headings color
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillovIlya committed Jan 29, 2025
1 parent d8a21cc commit e1afe23
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions word/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -951,12 +951,8 @@

//g_clipboardBase.Init(this);

if (config["headings-color"])
{
let rgba = AscCommon.RgbaHexToRGBA(config["headings-color"]);
AscWord.setDefaultHeadingColor(rgba.R, rgba.G, rgba.B)
}

this.headingsColor = config["headings-color"] ? config["headings-color"] : null;

this._init();
}

Expand Down Expand Up @@ -9797,7 +9793,13 @@ background-repeat: no-repeat;\
asc_docs_api.prototype._onEndLoadSdk = function()
{
AscCommon.baseEditorsApi.prototype._onEndLoadSdk.call(this);


if (this.headingsColor)
{
let rgba = AscCommon.RgbaHexToRGBA(this.headingsColor);
AscWord.setDefaultHeadingColor(rgba.R, rgba.G, rgba.B)
}

History = AscCommon.History;
g_fontApplication = AscFonts.g_fontApplication;
PasteElementsId = AscCommon.PasteElementsId;
Expand Down

0 comments on commit e1afe23

Please sign in to comment.