We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd67803 commit a84bc30Copy full SHA for a84bc30
1 file changed
src/components/TopTagSuggestions/index.jsx
@@ -36,8 +36,12 @@ const TopTagSuggestions = (props) => {
36
return null;
37
}
38
39
- // Parse current tags to avoid duplicates
40
- const currentTagsArray = props.currentTags ? props.currentTags.split(/,\s*/) : [];
+ // Parse current tags to avoid duplicates (supports string or array)
+ const currentTagsArray = Array.isArray(props.currentTags)
41
+ ? props.currentTags
42
+ : typeof props.currentTags === "string" && props.currentTags.length > 0
43
+ ? props.currentTags.split(/,\s*/)
44
+ : [];
45
46
return (
47
<div className="mr-mt-4">
0 commit comments