Skip to content

Commit

Permalink
Merge pull request #9 from cmcn/master
Browse files Browse the repository at this point in the history
Don't rerender the chart if data is null
  • Loading branch information
Duncan Walker committed Jan 28, 2016
2 parents d64c9cd + 97dd651 commit a996de6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
23 changes: 0 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,26 +226,3 @@ contentSecurityPolicy: {
'font-src': "'self' *.gstatic.com *.googleapis.com",
}
```

## Development

### Releases

Ensure tests are passing, then:

```sh
# Update github pages demo
ember github-pages:commit --message "Added some functionality"
git push origin gh-pages

# Go back to master branch
checkout master

# Release to NPM and Github
ember release # If patch
ember release --minor # If minor
ember release --major # If major

# Release on NPM
npm publish
```
4 changes: 1 addition & 3 deletions addon/components/google-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default Ember.Component.extend({
rerenderChart: Ember.observer('data', function() {
const chart = this.get('chart');

if (chart) {
if (chart && this.get('data')) {
this._renderChart();
}
}),
Expand Down Expand Up @@ -89,8 +89,6 @@ export default Ember.Component.extend({
const data = this.get('data');
const mergedOptions = this.get('mergedOptions');

assert('You have not passed any data to the chart', data);

this.renderChart(window.google, data, mergedOptions).then((chart) => {
this.set('chart', chart);
this.sendAction('chartDidRender', chart);
Expand Down

0 comments on commit a996de6

Please sign in to comment.