Fix tags input
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
34d32112fa
commit
412206c2e7
@ -37,9 +37,10 @@ import { ITag } from "../../types/tag.model";
|
|||||||
},
|
},
|
||||||
set(tagStrings) {
|
set(tagStrings) {
|
||||||
const tagEntities = tagStrings.map((tag: string | ITag) => {
|
const tagEntities = tagStrings.map((tag: string | ITag) => {
|
||||||
if (!(tag instanceof String)) {
|
if (typeof tag !== "string") {
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
// @ts-ignore
|
||||||
return { title: tag, slug: tag } as ITag;
|
return { title: tag, slug: tag } as ITag;
|
||||||
});
|
});
|
||||||
this.$emit("input", tagEntities);
|
this.$emit("input", tagEntities);
|
||||||
|
Loading…
Reference in New Issue
Block a user