Skip to content

Commit c3bed95

Browse files
committed
Fallback to fieldGroup[0] for type
1 parent ca7d6f9 commit c3bed95

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Dynamic attributes have a separate parameters that allows for generic setting of
5353
value: scopeData
5454
? scopeData[fieldGroup[1] ?? fieldGroup[0]].toString()
5555
: fieldGroup[1] ?? fieldGroup[0],
56-
trait_type: fieldGroup[2] ?? fieldGroup[1] ?? fieldGroup[0],
56+
trait_type: fieldGroup[2] ?? fieldGroup[0],
5757
}
5858
```
5959

api/metadata-generator/generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export async function getMetadata(
107107
dynamicAttributes.push({
108108
display_type: fieldGroup[0],
109109
value: scopeData[fieldGroup[1] ?? fieldGroup[0]].toString(),
110-
trait_type: fieldGroup[2] ?? fieldGroup[1] ?? fieldGroup[0],
110+
trait_type: fieldGroup[2] ?? fieldGroup[0],
111111
});
112112
}
113113
});
@@ -117,7 +117,7 @@ export async function getMetadata(
117117
dynamicAttributes.push({
118118
display_type: fieldGroup[0],
119119
value: fieldGroup[1] ?? fieldGroup[0],
120-
trait_type: fieldGroup[2] ?? fieldGroup[1] ?? fieldGroup[0],
120+
trait_type: fieldGroup[2] ?? fieldGroup[0],
121121
});
122122
}
123123
} catch (e) {

0 commit comments

Comments
 (0)