]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix missing Chart.Chart (deprecated) alias (#6112)
authorSimon Brunel <simonbrunel@users.noreply.github.com>
Wed, 6 Mar 2019 08:12:29 +0000 (09:12 +0100)
committerGitHub <noreply@github.com>
Wed, 6 Mar 2019 08:12:29 +0000 (09:12 +0100)
src/index.js
test/specs/global.deprecations.tests.js

index 586dcc3829545a0e661c05d94e3bc7c43f3bdfc8..a8286b302c19e05505e35a0a5595d084e23b8a05 100644 (file)
@@ -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
index d9e705a1c32c809d4432961507c7a6ec3faaad21..437a316fe0b176d4a14ffe8324a67e77bdddc33c 100644 (file)
@@ -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');