]> git.ipfire.org Git - thirdparty/Chart.js.git/commit
Require 'this' when calling tick formatters (#12064)
authorJosh Kelley <joshkel@gmail.com>
Fri, 18 Apr 2025 11:16:34 +0000 (07:16 -0400)
committerGitHub <noreply@github.com>
Fri, 18 Apr 2025 11:16:34 +0000 (13:16 +0200)
commit3361a637052c2e51d5bcf077e727e06a53941a3a
treefc88b4c6d4081b43c1f5aea4997b162e293eefe9
parentf46572e19a039792dae1553007dc7d38030c9eb1
Require 'this' when calling tick formatters (#12064)

The `numeric` and `logarithmic` tick formatters require that `this` be provided. That happens automatically if they're used directly as a tick callback but not if they're invoked manually. Failing to pass `this` results in runtime errors similar to the following:

```
TypeError: Cannot read properties of undefined (reading 'chart')
```
src/types/index.d.ts
test/types/ticks/ticks.ts [new file with mode: 0644]