fin-hypergrid / core

A canvas-based super high performant grid renderer API
MIT License
897 stars 144 forks source link

Simple example error when using minified `fin-hypergrid.min.js` CDN #827

Open jcmonnin opened 3 years ago

jcmonnin commented 3 years ago

When trying to run the simple example locally, I it worked with <script src='https://fin-hypergrid.github.io/core/3.3.2/build/fin-hypergrid.js'></script> however it gave errors when using the minified version: <script src='https://fin-hypergrid.github.io/core/3.3.2/build/fin-hypergrid.min.js'></script>

image


Following page gives the error:

<head>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  <meta http-equiv="Cache-Control" content="must-revalidate" />
  <link rel="icon" type="image/png" href="img/hypergrid-icon.png">
</head>

<body>

  <script src='https://fin-hypergrid.github.io/core/3.3.2/build/fin-hypergrid.min.js'></script>

  <script>
    var grid = new fin.Hypergrid({
      data: [
        { symbol: 'APPL', name: 'Apple Inc.', prevclose: 93.13 },
        { symbol: 'MSFT', name: 'Microsoft Corporation', prevclose: 51.91 },
        { symbol: 'TSLA', name: 'Tesla Motors Inc.', prevclose: 196.40 },
        { symbol: 'IBM', name: 'International Business Machines Corp', prevclose: 155.35 }
      ]
    });
  </script>

</body>

</html>

This works:

<head>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  <meta http-equiv="Cache-Control" content="must-revalidate" />
  <link rel="icon" type="image/png" href="img/hypergrid-icon.png">
</head>

<body>

  <script src='https://fin-hypergrid.github.io/core/3.3.2/build/fin-hypergrid.js'></script>

  <script>
    var grid = new fin.Hypergrid({
      data: [
        { symbol: 'APPL', name: 'Apple Inc.', prevclose: 93.13 },
        { symbol: 'MSFT', name: 'Microsoft Corporation', prevclose: 51.91 },
        { symbol: 'TSLA', name: 'Tesla Motors Inc.', prevclose: 196.40 },
        { symbol: 'IBM', name: 'International Business Machines Corp', prevclose: 155.35 }
      ]
    });
  </script>

</body>

</html>