Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit 8c6b8ea

Browse files
committed
fix AMD loader
1 parent 3ca6e84 commit 8c6b8ea

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Installation
2929

3030
### AMD
3131
```
32-
define('path/to/chart.js', 'react-chartjs', function(Chart, ReactChart) {
32+
define('path/to/chart.js', 'react', 'react-chartjs', function(Chart, React, ReactChart) {
3333
// initialize ReactChartjs
34-
ReactChart(Chart);
34+
ReactChart(Chart, React);
3535
/// now you can refer to React charts as Chart.React.*
3636
});
3737
```

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
return main;
99
});
1010
}
11-
})(function(Chart) {
11+
})(function(Chart, React) {
12+
require('./vars').React = React;
1213
Chart.React = {
1314
Bar: require('./bar'),
1415
Doughnut: require('./doughnut'),

0 commit comments

Comments
 (0)