Commit a3065619 authored by Clément's avatar Clément

bugfix: avoid error for unsupported browsers

parent 8f6e90ec
Pipeline #2599 passed with stage
in 27 seconds
......@@ -67,7 +67,7 @@ export default class SIBRoute extends HTMLElement {
router.display();
}
activate() {
if (this.view instanceof HTMLDialogElement){
if ('HTMLDialogElement' in window && this.view instanceof window.HTMLDialogElement){
if(!this.view.hasAttribute('open')) {
this.view.showModal();
}
......@@ -82,7 +82,7 @@ export default class SIBRoute extends HTMLElement {
this.updateSubrouter(router);
}
hide() {
if (this.view instanceof HTMLDialogElement){
if ('HTMLDialogElement' in window && this.view instanceof window.HTMLDialogElement){
this.view.close()
} else {
this.view.setAttribute('hidden', '');
......
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