Skip to content

Commit

Permalink
🚑 Fix reading metadata undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 committed Nov 17, 2023
1 parent a37f5a3 commit 70f0e74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion components/IscnUploadForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,9 @@ export default class UploadForm extends Vue {
this.sentArweaveTransactionInfo.set(records.ipfsHash, { ...uploadedData, arweaveId });
if (tempRecord.fileName.includes('cover.jpeg')) {
const metadata = this.epubMetadataList.find((file: any) => file.ipfsHash === records.ipfsHash)
metadata.thumbnailUrl = arweaveId
if (metadata && metadata.thumbnailUrl) {
metadata.thumbnailUrl = arweaveId
}
}
this.$emit('arweaveUploaded', { arweaveId })
this.isOpenSignDialog = false
Expand Down
2 changes: 1 addition & 1 deletion components/SameAsFieldList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default class WalletFieldList extends Vue {
if (this.currentList.length) {
this.sameAsList = this.currentList.map((list) => ({
url: list.url,
id: `${list.url}-${list.filename}`,
id: `$submitToArweave{list.url}-${list.filename}`,
filename: list.filename,
filetype: list.filetype || SAME_AS_FILE_TYPES[0],
originFileName: list.originFileName,
Expand Down

0 comments on commit 70f0e74

Please sign in to comment.