Commit a2102bc9 authored by Matthieu Fesselier's avatar Matthieu Fesselier

bugfix: fix multiple imports error #29

parent 7811cbd5
Pipeline #2970 passed with stage
in 27 seconds
......@@ -16,4 +16,6 @@ export default class SIBLink extends HTMLElement {
}
}
customElements.define('sib-link', SIBLink);
if (!customElements.get('sib-link')) {
customElements.define('sib-link', SIBLink);
}
\ No newline at end of file
......@@ -95,4 +95,6 @@ export default class SIBRoute extends HTMLElement {
}
}
customElements.define('sib-route', SIBRoute);
if (!customElements.get('sib-route')) {
customElements.define('sib-route', SIBRoute);
}
\ No newline at end of file
......@@ -85,7 +85,10 @@ export default class SIBRouter extends HTMLElement {
this.display(routeName, resource, keepURL);
}
}
customElements.define('sib-router', SIBRouter);
if (!customElements.get('sib-router')) {
customElements.define('sib-router', SIBRouter);
}
function stripSlashes(str) {
return str.replace(/^\/+|\/+$/g, '');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment