Skip to content

Commit

Permalink
Prevent server error cause c3 uses window
Browse files Browse the repository at this point in the history
  • Loading branch information
maZahaca authored Dec 27, 2016
1 parent 7523476 commit 468f400
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 468f400

Please sign in to comment.