diff --git a/src/schema.test.ts b/src/schema.test.ts
index 1b9eb9e..e72a1c3 100644
--- a/src/schema.test.ts
+++ b/src/schema.test.ts
@@ -157,6 +157,18 @@ describe("transforming from schema v1 to v2", () => {
viewBox: "0 0 512 512"
}
+ test("name gets copied over", () => {
+ const result = transformToLatest(createV1Asset())
+
+ expect((result.icon as SvgIcon).name).toBe((v2Asset.icon as SvgIcon).name)
+ })
+
+ test("author gets copied over", () => {
+ const result = transformToLatest(createV1Asset())
+
+ expect((result.icon as SvgIcon).author).toBe((v2Asset.icon as SvgIcon).author)
+ })
+
const svgProperties = ["d", "fill", "fillOpacity", "viewBox"]
svgProperties.forEach((prop) => {
diff --git a/src/schema.ts b/src/schema.ts
index 48e44bf..6226957 100644
--- a/src/schema.ts
+++ b/src/schema.ts
@@ -105,8 +105,8 @@ function transformToV2(v1: AssetDocumentV1): AssetDocumentV2 {
} else if (typeof v1.icon === "object") {
v2.icon = {
type: "svg",
- author: "",
- name: "",
+ author: v1.icon.author,
+ name: v1.icon.name,
svg: transformSvgString(v1.icon.svg)
}