🐛 Fixes numbers being removed from tags (#430)

This commit is contained in:
Alicia Sykes 2022-01-28 13:33:41 +00:00
parent 35ccf1bf7b
commit 6e2ae6d3fc

View File

@ -226,7 +226,7 @@ export default {
if (newItem.hotkey) newItem.hotkey = parseInt(newItem.hotkey, 10); if (newItem.hotkey) newItem.hotkey = parseInt(newItem.hotkey, 10);
const strToTags = (str) => { const strToTags = (str) => {
const tagArr = str.split(','); const tagArr = str.split(',');
return tagArr.map((tag) => tag.trim().toLowerCase().replace(/[^a-z]+/, '')); return tagArr.map((tag) => tag.trim().toLowerCase().replace(/[^a-z0-9]+/, ''));
}; };
const strToBool = (str) => { const strToBool = (str) => {
if (str === undefined) return undefined; if (str === undefined) return undefined;