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

Binding class with `null` value no longer work #1501

Open
deraw opened this issue Apr 9, 2020 · 5 comments
Open

Binding class with `null` value no longer work #1501

deraw opened this issue Apr 9, 2020 · 5 comments
Labels

Comments

@deraw
Copy link

@deraw deraw commented Apr 9, 2020

Version

1.0.0-beta.33

Reproduction link

https://github.com/assurance-maladie-digital/design-system/blob/dev/packages/vue-dot/src/patterns/FileList/FileList.vue

Steps to reproduce

Mount a component with :class="null"

What is expected?

No errors

What is actually happening?

An error occurs: [Vue warn]: Error in render: "TypeError: Cannot convert undefined or null to object"


This was working on previous version

(Sorry I couln't find a boilerplate to provide a minial reproduction, I linked the file where I'm getting the error)

@lmiller1990
Copy link
Member

@lmiller1990 lmiller1990 commented Apr 11, 2020

I can't reproduce this - I ran FileList.spec.ts but it passed w/o error. Going to need some more info here.

@deraw
Copy link
Author

@deraw deraw commented Apr 11, 2020

@lmiller1990 Thanks for your reply!
I think that's normal, I updated the file with a workaround to fix the issue by returning an empty string instead of null

I should have pointed to this version https://github.com/assurance-maladie-digital/design-system/blob/7088316c095cd7e58f19d0ee3d2915ae6ba595a2/packages/vue-dot/src/patterns/FileList/FileList.vue in which the code has not updated, sorry!

@lmiller1990
Copy link
Member

@lmiller1990 lmiller1990 commented Apr 18, 2020

Hey thanks. I can try and look this week! Did you figure a fix/workaround yet?

@deraw
Copy link
Author

@deraw deraw commented Apr 18, 2020

@lmiller1990 Thank you for taking the time for this! As a workaround I'm returning an empty string instead of null

@lmiller1990
Copy link
Member

@lmiller1990 lmiller1990 commented Apr 22, 2020

^ this would probably be a good way to fix it in this library too; figure out where the null is raising an issue and return a ''.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.