Skip to content

Commit

Permalink
fix: should remove container firstly
Browse files Browse the repository at this point in the history
  • Loading branch information
imcuttle committed Sep 14, 2018
1 parent e892762 commit 8dfcc84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/util.createmount/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export default function createMountCenter<P = any>(opts: IMountOptions<P> = {}):
return {
close() {
let dom = getContainer()
container = null
ReactDOM.unmountComponentAtNode(dom)
dom.parentNode.removeChild(dom)
container = null
},
open({ element = centerOpts.element, mountNode = centerOpts.mountNode, attributes = centerOpts.attributes } = {}) {
const dom = getContainer(attributes, mountNode)
Expand Down

0 comments on commit 8dfcc84

Please sign in to comment.