Skip to content

Commit c0adc94

Browse files
committed
Merge commit 'd3868afbca86abf23efe527dad9251d3bcae20b2'
2 parents e7d1bf9 + d3868af commit c0adc94

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Additional, optional, third parameter to `Vue.customElement()` is options object
168168
console.info('vueInstanceCreatedCallback');
169169
},
170170

171-
// in case of using vue-custom-element with modals, we destroy it after defined timeout
171+
// in case of using vue-custom-element with modals, we destroy it after defined timeout. Use "null" value if you want to manually "$destroy" it.
172172
destroyTimeout: 3000,
173173

174174
// only needed when using lazy-loading - 'props' are not accessible on Custom Element registration so we have to provide them

src/vue-custom-element.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function install(Vue) {
4848
this.__detached__ = true;
4949
typeof options.disconnectedCallback === 'function' && options.disconnectedCallback.call(this);
5050

51-
setTimeout(() => {
51+
options.destroyTimeout !== null && setTimeout(() => {
5252
if (this.__detached__ && this.__vue_custom_element__) {
5353
this.__vue_custom_element__.$destroy(true);
5454
delete this.__vue_custom_element__;

0 commit comments

Comments
 (0)