vaadin / router

Small and powerful client-side router for Web Components. Framework-agnostic.
https://vaadin.com/router
Apache License 2.0
406 stars 49 forks source link

Failed to construct 'CustomElement': The result must not have attributes #882

Open yshirsath opened 3 months ago

yshirsath commented 3 months ago

Router.js#247 throws this error when run from Cypress integration tests in our GitHub runner.

Versions:

Known Facts:

index.ts

const router = new Router(document.querySelector('body'));
router.setRoutes([{path: '/test', component: 'root-view'}], true);

root-view.ts

import { LitElement, html } from "lit-element";

export class RootView extends LitElement {
  render() {
    return html`Hi`;
  }
}

customElements.define("root-view", RootView);
Artur- commented 3 months ago

Sounds like you have a custom element with a constructor that sets attributes

yshirsath commented 3 months ago

Hey @Artur- , thanks for the reply. As you can see there is only one element in our project and it does not in fact have a constructor.