Skip to content

Chart doesn't render #3

@m-aciek

Description

@m-aciek

In the console I see the following JS error:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toISOString')
    at cleanData (script.js:37:29)
    at script.js:74:25
function cleanData(data) {
  const today = new Date();

  for (let i = 0; i < data.length; i++) {
    // Remove the last element: "Notes"
    data[i] = data[i].slice(0, -1);
    // Set second element to third element
    data[i][1] = data[i][2].toISOString().slice(0, 10);
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions