From 87a74f99a1e73fef3ebd314a11c322829c3d7cd1 Mon Sep 17 00:00:00 2001 From: Simon Brunel Date: Wed, 6 Mar 2019 09:12:29 +0100 Subject: [PATCH] Fix missing Chart.Chart (deprecated) alias (#6112) --- src/index.js | 9 +++++++++ test/specs/global.deprecations.tests.js | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/src/index.js b/src/index.js index 586dcc382..a8286b302 100644 --- a/src/index.js +++ b/src/index.js @@ -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 diff --git a/test/specs/global.deprecations.tests.js b/test/specs/global.deprecations.tests.js index d9e705a1c..437a316fe 100644 --- a/test/specs/global.deprecations.tests.js +++ b/test/specs/global.deprecations.tests.js @@ -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'); -- 2.47.3