Skip to content

Commit 01fea6a

Browse files
authored
Merge pull request #27 from etimberg/correct-import
Correct import for ESM builds
2 parents 60f5e6f + 12c2d28 commit 01fea6a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "chartjs-adapter-moment",
33
"homepage": "https://www.chartjs.org",
44
"description": "Chart.js adapter to use Moment.js for time functionalities",
5-
"version": "1.0.0-beta.1",
5+
"version": "1.0.0-beta.2",
66
"license": "MIT",
77
"main": "dist/chartjs-adapter-moment.js",
88
"module": "dist/chartjs-adapter-moment.esm.js",

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
import moment from 'moment';
4-
import {Chart} from 'chart.js';
4+
import {_adapters} from 'chart.js';
55

66
const FORMATS = {
77
datetime: 'MMM D, YYYY, h:mm:ss a',
@@ -16,7 +16,7 @@ const FORMATS = {
1616
year: 'YYYY'
1717
};
1818

19-
Chart._adapters._date.override(typeof moment === 'function' ? {
19+
_adapters._date.override(typeof moment === 'function' ? {
2020
_id: 'moment', // DEBUG ONLY
2121

2222
formats: function() {

0 commit comments

Comments
 (0)