Skip to content

Commit

Permalink
update dropzone for webpack4
Browse files Browse the repository at this point in the history
  • Loading branch information
HillLiu committed May 29, 2018
1 parent 4e43a89 commit b0e3750
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/organism-react-dropzone/ui/organisms/Dropzone.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
});
}
Expand Down

0 comments on commit b0e3750

Please sign in to comment.