From b0e375079cd3a69f9503263329a14385f1de0f58 Mon Sep 17 00:00:00 2001 From: Hill Date: Tue, 29 May 2018 12:08:20 +0000 Subject: [PATCH] update dropzone for webpack4 https://github.com/react-atomic/reshow/issues/4 --- .../organism-react-dropzone/ui/organisms/Dropzone.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/organism-react-dropzone/ui/organisms/Dropzone.jsx b/packages/organism-react-dropzone/ui/organisms/Dropzone.jsx index afcc0c088..9c5ff210e 100644 --- a/packages/organism-react-dropzone/ui/organisms/Dropzone.jsx +++ b/packages/organism-react-dropzone/ui/organisms/Dropzone.jsx @@ -5,7 +5,7 @@ import { SemanticUI } from 'react-atomic-molecule'; -import get from 'get-object-value'; +import get, {getDefault} from 'get-object-value'; const keys = Object.keys; @@ -148,9 +148,10 @@ class Dropzone extends PureComponent */ componentDidMount() { injects = lazyInject( injects, InjectStyles ); - import('../../src/dropzone').then((Dropzone)=>{ - Dropzone.autoDiscover = false; - lazyDropzone = Dropzone; + import('../../src/dropzone').then( dropzone => { + dropzone = getDefault(dropzone); + dropzone.autoDiscover = false; + lazyDropzone = dropzone; this.initDropzone(this.props); }); }