Uploaded image for project: 'ZK Charts'
  1. ZK Charts
  2. ZKCHARTS-154

Uncaught TypeError: (new Promise(...)).finally is not a function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 11.4.7.0
    • 11.2.0.0
    • Security Level: Jimmy
    • None

      Steps to Reproduce

          <charts id="chart" type="line" title="Season Average Temperature"/>
          <script defer="true" src="promise.js"/>
      
      1. run the page in Firefox and Safari
      2. open developer tool > console tab

      Current Result

      Uncaught TypeError: (new Promise(...)).finally is not a function

      Expected Result

      no error

      Debug Information

      • Chrome doesn't produce the error.
      • a real use case: a user includes a 3rd-party js library that calls Promise.finally, and it produces the error in the browser developer tool console. Because canvg.js override Promise.prototype, so there is no finally() available.

      Workaround

      1. put an empty canvg.js in the below path to override existing canvg.js in zkcharts.jar

        1. empty-canvg.png
          14 kB
          hawk
        2. promise.js
          0.2 kB
          hawk

            Unassigned Unassigned
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: