Skip to content

Useless error logging when there is no puzzle information #17395

@Siderite

Description

@Siderite

Exact URL of where the bug happened

https://lichess.org/training/dashboard/30/dashboard

Steps to reproduce the bug

  1. Go to puzzle dashboard
  2. Select a number of days larger or equal to 21 days in which you have played no puzzles

What did you expect to happen?

No error in the console

What happened instead?

Console error "Failed to create chart: can't acquire context from the given item" is displayed.

Operating system

Windows 11

Browser and version (or alternate access method)

Brave desktop

Additional information

It's weird that the same problem doesn't happen for intervals of less than 21 days.

The error seems to be a chart.js one, originating from here:

export function initModule(data: RadarData) {

The code does check if there are datasets to be loaded, but there is always the "Performance" dataset, so it goes through.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions