Merge pull request #105 from DaxChen/master

Fix MutationObserver callback $refs.modal undefined
This commit is contained in:
Yev Vlasenko
2017-10-18 11:07:30 +01:00
committed by GitHub
4 changed files with 16 additions and 19 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
"start": "nuxt"
},
"dependencies": {
"vue-js-modal": "latest",
"nuxt": "^1.0.0-rc3"
"nuxt": "^1.0.0-rc3",
"vue-js-modal": "../../"
}
}
+5 -5
View File
File diff suppressed because one or more lines are too long
+5 -5
View File
File diff suppressed because one or more lines are too long
+4 -7
View File
@@ -560,11 +560,6 @@
const afterEvent = this.genEventObject({ state })
this.$emit(afterEventName, afterEvent)
// recalculate the true modal height
if (state && this.isAutoHeight) {
this.updateRenderedHeight()
}
},
/**
@@ -574,8 +569,10 @@
* 2. MutationObserver's observe callback
*/
updateRenderedHeight () {
this.modal.renderedHeight = this.$refs.modal
.getBoundingClientRect().height
if (this.$refs.modal) {
this.modal.renderedHeight = this.$refs.modal
.getBoundingClientRect().height
}
},
/**