🐛 Fixes str.split on tags array (#575)

This commit is contained in:
Alicia Sykes 2022-03-27 17:09:06 +01:00
parent f4443d0077
commit 68b77587ff
1 changed files with 2 additions and 2 deletions

View File

@ -231,8 +231,8 @@ export default {
const newItem = item;
newItem.id = this.itemId;
if (newItem.hotkey) newItem.hotkey = parseInt(newItem.hotkey, 10);
const strToTags = (str) => {
const tagArr = str.split(',');
const strToTags = (tags) => {
const tagArr = (typeof tags === 'string') ? tags.split(',') : tags;
return tagArr.map((tag) => tag.trim().toLowerCase().replace(/[^a-z0-9]+/, ''));
};
const strToBool = (str) => {