Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom style properties prevent MQ from rendering components #113

Open
JordanMcInnisGithub opened this issue Aug 22, 2022 · 0 comments
Open

Comments

@JordanMcInnisGithub
Copy link

As per title, mithril query fails to render components that are passed custom style properties via mithril js syntax. For instance, declaring a component with mq such as:

const someComp = mq(someComp, { attr1: true, attr2: false, style: {"--testVar": 12}});

or within the component view such as:

return m("some-name", { style: { "--testVar": 12}}, [childrenHere...]);

...will cause the following error when running tests

TypeError: Cannot read properties of undefined (reading 'type')

However, setting up the same functionality in the same way, but adding the properties via js inside the component view()/oncreate() causes no issues.

document.querySelector(".someComp").style.setProperty("--testVar", 12);

``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant