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

Commit

Permalink
fix AMD loader
Browse files Browse the repository at this point in the history
  • Loading branch information
jhudson8 committed Dec 28, 2014
1 parent 3ca6e84 commit 8c6b8ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Installation

### AMD
```
define('path/to/chart.js', 'react-chartjs', function(Chart, ReactChart) {
define('path/to/chart.js', 'react', 'react-chartjs', function(Chart, React, ReactChart) {
// initialize ReactChartjs
ReactChart(Chart);
ReactChart(Chart, React);
/// now you can refer to React charts as Chart.React.*
});
```
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
return main;
});
}
})(function(Chart) {
})(function(Chart, React) {
require('./vars').React = React;
Chart.React = {
Bar: require('./bar'),
Doughnut: require('./doughnut'),
Expand Down

0 comments on commit 8c6b8ea

Please sign in to comment.