Skip to content

Commit

Permalink
remove warning message for already registered custom element (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth authored May 15, 2021
1 parent 247e09f commit 73ac528
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions javascript/stream_from_element.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ class StreamFromElement extends HTMLElement {
}
}

const customElement = window.customElements.get('stream-from')

if (customElement) {
if (customElement !== StreamFromElement) {
console.warn(
'CableReady tried to register the HTML custom element `stream-from`, but `stream-from` is already registered and used by something else. Make sure that nothing else defines the custom element `stream-from`.'
)
} else {
// CableReady has already registered the `stream-from` custom element and it's the right one
}
} else {
if (!window.customElements.get('stream-from')) {
window.customElements.define('stream-from', StreamFromElement)
}

0 comments on commit 73ac528

Please sign in to comment.