mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
improve tag creating
This commit is contained in:
@@ -203,7 +203,11 @@ export function QuickAddTagDialog({
|
||||
return;
|
||||
}
|
||||
setError(null);
|
||||
const names = text.split(separator).filter((n) => n.length > 0);
|
||||
let sep: string | RegExp = separator;
|
||||
if (sep === " ") {
|
||||
sep = /\s+/;
|
||||
}
|
||||
const names = text.split(sep).filter((n) => n.length > 0);
|
||||
setLoading(true);
|
||||
const res = await network.getOrCreateTags(names, type);
|
||||
setLoading(false);
|
||||
|
Reference in New Issue
Block a user