mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-30 00:55:36 +02:00
🐛 Fixes str.split on tags array (#575)
This commit is contained in:
parent
f4443d0077
commit
68b77587ff
@ -231,8 +231,8 @@ export default {
|
|||||||
const newItem = item;
|
const newItem = item;
|
||||||
newItem.id = this.itemId;
|
newItem.id = this.itemId;
|
||||||
if (newItem.hotkey) newItem.hotkey = parseInt(newItem.hotkey, 10);
|
if (newItem.hotkey) newItem.hotkey = parseInt(newItem.hotkey, 10);
|
||||||
const strToTags = (str) => {
|
const strToTags = (tags) => {
|
||||||
const tagArr = str.split(',');
|
const tagArr = (typeof tags === 'string') ? tags.split(',') : tags;
|
||||||
return tagArr.map((tag) => tag.trim().toLowerCase().replace(/[^a-z0-9]+/, ''));
|
return tagArr.map((tag) => tag.trim().toLowerCase().replace(/[^a-z0-9]+/, ''));
|
||||||
};
|
};
|
||||||
const strToBool = (str) => {
|
const strToBool = (str) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user