Home Forums Report Bugs A duplicate borderThickness declaration incompatible

A duplicate borderThickness declaration incompatible

Viewing 2 posts - 1 through 2 (of 2 total)
  • #28251

    CanvasJS code, both 2.1 & the latest 2.3.2 contains a duplicate key definition in one of the objects. This is allowed everywhere in ES6+ but it was disallowed in ES5 strict mode which is what IE implements. I do realize CanvasJS is technically not written in strict mode but some tools impose its restrictions.

    Besides, there’s hardly any point in duplicate object keys. This is because the following object definition:
    var o = { a: 1, a: 2 };
    will produce an object { a: 2 } – the last definition wins. The CanvasJS object in question first defines borderThickness:this.labelBorderThickness and then borderThickness:0; the first of them can be removed. Can you do that?

    I submitted it first at https://canvasjs.com/forums/topic/a-duplicate-borderthickness-declaration-incompaible/ but when I edited my post, it disappeared completely & I had to re-type everything. :( Please fix the forum.

    Best regards,
    Michał

    #28279

    @mgol,

    CanvasJS code, both 2.1 & the latest 2.3.2 contains a duplicate key definition in one of the objects. This is allowed everywhere in ES6+ but it was disallowed in ES5 strict mode which is what IE implements. I do realize CanvasJS is technically not written in strict mode but some tools impose its restrictions.

    Besides, there’s hardly any point in duplicate object keys. This is because the following object definition:
    var o = { a: 1, a: 2 };
    will produce an object { a: 2 } – the last definition wins. The CanvasJS object in question first defines borderThickness:this.labelBorderThickness and then borderThickness:0; the first of them can be removed. Can you do that?

    Thanks for reporting the issue, we will fix it in our future releases.

    I submitted it first at https://canvasjs.com/forums/topic/a-duplicate-borderthickness-declaration-incompaible/ but when I edited my post, it disappeared completely & I had to re-type everything. :( Please fix the forum.

    We deeply regret the inconvenience caused. We have escalated the issue to the concerned team.

    ___________
    Indranil Deo
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.