Skip to content

Commit

Permalink
fix body not found issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wxsms committed Nov 23, 2017
1 parent 5e255b0 commit f05b124
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/services/messagebox/messageBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import MessageBox from './MessageBox.vue'
import Vue from 'vue'

let instance
let body = document.body

const destroyModal = () => {
if (instance) {
Expand Down Expand Up @@ -57,7 +56,7 @@ const init = (type, options, cb, resolve = null, reject = null) => {
}
})
instance.$mount()
body.appendChild(instance.$el)
document.body.appendChild(instance.$el)
instance.show = true
}

Expand Down
4 changes: 1 addition & 3 deletions src/services/notification/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ const queues = {
[PLACEMENTS.BOTTOM_RIGHT]: []
}

const body = document.body

const destroy = (queue, instance) => {
// console.log('destroyNotification')
removeFromDom(instance.$el)
Expand Down Expand Up @@ -45,7 +43,7 @@ const init = (options, cb, resolve = null, reject = null) => {
}
})
instance.$mount()
body.appendChild(instance.$el)
document.body.appendChild(instance.$el)
queue.push(instance)
}

Expand Down

0 comments on commit f05b124

Please # to comment.