diff --git a/src/factory.js b/src/factory.js index 0e13d4b..00d513e 100644 --- a/src/factory.js +++ b/src/factory.js @@ -73,6 +73,7 @@ export default function plotComponentFactory(Plotly) { } componentDidMount() { + if (!isBrowser) return; this.p = this.p .then(() => { return Plotly.newPlot(this.el, { @@ -95,6 +96,7 @@ export default function plotComponentFactory(Plotly) { } componentWillUpdate(nextProps) { + if (!isBrowser) return; this.p = this.p .then(() => { if (hasReactAPIMethod) {