11/**
2- * vue-custom-element v3.2.3
2+ * vue-custom-element v3.2.4
33 * (c) 2018 Karol Fabjańczuk
44 * @license MIT
55 */
@@ -71,6 +71,11 @@ function registerCustomElement(tag) {
7171 typeof options . attributeChangedCallback === 'function' && options . attributeChangedCallback . call ( this , name , oldValue , value ) ;
7272 }
7373
74+ function define ( tagName , CustomElement ) {
75+ var existingCustomElement = customElements . get ( tagName ) ;
76+ return typeof existingCustomElement !== 'undefined' ? existingCustomElement : customElements . define ( tagName , CustomElement ) ;
77+ }
78+
7479 if ( isES2015$1 ) {
7580 var CustomElement = function ( _CustomElement2 ) {
7681 _inherits ( CustomElement , _CustomElement2 ) ;
@@ -102,7 +107,7 @@ function registerCustomElement(tag) {
102107 CustomElement . prototype . disconnectedCallback = disconnectedCallback ;
103108 CustomElement . prototype . attributeChangedCallback = attributeChangedCallback ;
104109
105- customElements . define ( tag , CustomElement ) ;
110+ define ( tag , CustomElement ) ;
106111 return CustomElement ;
107112 } else {
108113 var _CustomElement3 = function _CustomElement3 ( self ) {
@@ -126,7 +131,7 @@ function registerCustomElement(tag) {
126131 _CustomElement3 . prototype . disconnectedCallback = disconnectedCallback ;
127132 _CustomElement3 . prototype . attributeChangedCallback = attributeChangedCallback ;
128133
129- customElements . define ( tag , _CustomElement3 ) ;
134+ define ( tag , _CustomElement3 ) ;
130135 return _CustomElement3 ;
131136 }
132137}
0 commit comments