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

class shorthand directive with computed (or any?) property doesn't update properly #1739

Closed
PixievoltNo1 opened this issue Sep 13, 2018 · 1 comment

Comments

@PixievoltNo1
Copy link

PixievoltNo1 commented Sep 13, 2018

Demo: https://svelte.technology/repl?version=2.13.4&gist=c701a8c8404a63e379818995093f6117

Run app.set({bar: true}) and watch absolutely nothing happen to the h1. If you change the directive to class:foo="foo", it works fine.

Edit: It appears to happen with all properties, not just computed. No idea why I didn't see it with non-computed before.

@PixievoltNo1 PixievoltNo1 changed the title class shorthand directive with computed property doesn't update properly class shorthand directive with computed (or any?) property doesn't update properly Sep 13, 2018
@PaulMaly
Copy link
Contributor

PaulMaly commented Sep 13, 2018

Seems works as expected:

https://svelte.technology/repl?version=2.13.4&gist=fa4c785b3259fa79d1a383dbf423ea0f

UPDATE:
I've missed that this issue concerns only shorthand, sorry. Yep, seems not working:
https://svelte.technology/repl?version=2.13.4&gist=80c878cf4bc97ca01c0a01346a4e176c

Rich-Harris added a commit that referenced this issue Sep 19, 2018
Fixes shorthand class directives which do not have classes
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

2 participants