mirror of
				https://github.com/KevinMidboe/vue-js-modal.git
				synced 2025-10-29 18:00:20 +00:00 
			
		
		
		
	check $refs.modal in observe callback
This commit is contained in:
		| @@ -4,7 +4,7 @@ | |||||||
|     "start": "nuxt" |     "start": "nuxt" | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "vue-js-modal": "latest", |     "nuxt": "^1.0.0-rc3", | ||||||
|     "nuxt": "^1.0.0-rc3" |     "vue-js-modal": "../../" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										10
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										10
									
								
								dist/ssr.index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								dist/ssr.index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -560,11 +560,6 @@ | |||||||
|         const afterEvent = this.genEventObject({ state }) |         const afterEvent = this.genEventObject({ state }) | ||||||
|  |  | ||||||
|         this.$emit(afterEventName, afterEvent) |         this.$emit(afterEventName, afterEvent) | ||||||
|  |  | ||||||
|         // recalculate the true modal height |  | ||||||
|         if (state && this.isAutoHeight) { |  | ||||||
|           this.updateRenderedHeight() |  | ||||||
|         } |  | ||||||
|       }, |       }, | ||||||
|  |  | ||||||
|       /** |       /** | ||||||
| @@ -574,8 +569,10 @@ | |||||||
|        * 2. MutationObserver's observe callback |        * 2. MutationObserver's observe callback | ||||||
|        */ |        */ | ||||||
|       updateRenderedHeight () { |       updateRenderedHeight () { | ||||||
|         this.modal.renderedHeight = this.$refs.modal |         if (this.$refs.modal) { | ||||||
|           .getBoundingClientRect().height |           this.modal.renderedHeight = this.$refs.modal | ||||||
|  |             .getBoundingClientRect().height | ||||||
|  |         } | ||||||
|       }, |       }, | ||||||
|  |  | ||||||
|       /** |       /** | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user