Skip to content

Commit

Permalink
fixed potential metadata issues
Browse files Browse the repository at this point in the history
  • Loading branch information
IDCs committed Dec 21, 2023
1 parent f30d8af commit c0dfc14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ function init(context: types.IExtensionContext) {
const batched = [
actions.setModEnabled(profileId, modId, true),
];
if (meta.length > 0) {
if (meta.length > 0 && !!meta[0].value?.details) {
batched.push(actions.setDownloadModInfo(archiveId, 'nexus.modInfo', meta[0].value) as any);
batched.push(actions.setModAttribute(gameId, modId, 'version', meta[0].value?.fileVersion) as any);
batched.push(actions.setModAttribute(gameId, modId, 'version', meta[0].value.fileVersion) as any);
batched.push(actions.setModAttribute(gameId, modId, 'modId', meta[0].value.details.modId) as any);
batched.push(actions.setModAttribute(gameId, modId, 'fileId', meta[0].value.details.fileId) as any);
// batched.push(actions.setModAttributes(gameId, modId, meta[0].value) as any);
Expand Down

0 comments on commit c0dfc14

Please sign in to comment.