Skip to content

Commit

Permalink
Merge pull request #14 from maZahaca/feature-server-usage-error
Browse files Browse the repository at this point in the history
Prevent server error cause c3 uses window
  • Loading branch information
bcbcarl authored Dec 28, 2016
2 parents 7523476 + 468f400 commit 51092e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { findDOMNode } from 'react-dom';
import c3 from 'c3';
let c3;

class C3Chart extends React.Component {
static get displayName() {
Expand Down Expand Up @@ -42,6 +42,7 @@ class C3Chart extends React.Component {
}

componentDidMount() {
c3 = require('c3');
this.updateChart(this.props);
}

Expand Down

0 comments on commit 51092e2

Please sign in to comment.