Closed frankcai closed 2 years ago
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.
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.
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