-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[BUG] Configuration not saveable when a single tag exists #575
Labels
🐛 Bug
[ISSUE] Ticket describing something that isn't working
Comments
frankcai
changed the title
[BUG] Configuration not savable when a single tag exists
[BUG] Configuration not saveable when a single tag exists
Mar 25, 2022
Thanks for the really clear test cases. Looks like a type error, after the second save the tags are an array, so str.split is throwing an error. dashy/src/components/InteractiveEditor/EditItem.vue Lines 234 to 237 in b51935f
So I something like this should work const strToTags = (str) => {
- const tagArr = str.split(',');
+ const tagArr = (typeof tags === 'string') ? tags.split(',') : tags;
return tagArr.map((tag) => tag.trim().toLowerCase().replace(/[^a-z0-9]+/, ''));
}; I'll test it out, and will submit a fix for this as part of #557 and update you when mreged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Self-Hosted (Docker)
Version
2.0.5
Describe the problem
This error is similar to #430 though not quite the same. In some cases when theres a single tag set in an item saving doesn't work. Further below i've described cases where it works and doesn't work.
In the console there is the following error when trying to save:
Test cases that fail to save:
Test cases that work:
Additional info
No response
Please tick the boxes
The text was updated successfully, but these errors were encountered: