Skip to content

Commit

Permalink
Fix missing Chart.Chart (deprecated) alias (chartjs#6112)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrunel authored Mar 6, 2019
1 parent d8ea677 commit 545269b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ if (typeof window !== 'undefined') {

// DEPRECATIONS

/**
* Provided for backward compatibility, not available anymore
* @namespace Chart.Chart
* @deprecated since version 2.8.0
* @todo remove at version 3
* @private
*/
Chart.Chart = Chart;

/**
* Provided for backward compatibility, not available anymore
* @namespace Chart.Legend
Expand Down
6 changes: 6 additions & 0 deletions test/specs/global.deprecations.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ describe('Deprecations', function() {
});
});

describe('Chart.Chart', function() {
it('should be defined as an alias to Chart', function() {
expect(Chart.Chart).toBe(Chart);
});
});

describe('Chart.helpers.aliasPixel', function() {
it('should be defined as a function', function() {
expect(typeof Chart.helpers.aliasPixel).toBe('function');
Expand Down

0 comments on commit 545269b

Please sign in to comment.