diff --git a/tools/tasks/changelog/generateModChanges.ts b/tools/tasks/changelog/generateModChanges.ts index bcf3889..212e0d5 100644 --- a/tools/tasks/changelog/generateModChanges.ts +++ b/tools/tasks/changelog/generateModChanges.ts @@ -17,9 +17,11 @@ const getModChangesFormatting: (commits: Commit[]) => SpecialChangelogFormatting return { formatting: (message, subMessage, indentation, commits) => { // Sub messages are details, so make them bold & italic - if (subMessage) { - return `${indentation}* ***${message}***`; - } + if (subMessage) return `${indentation}* ***${message}***`; + + // Edge Case + if (!commits) return `${indentation}* ${message}`; + if (commits.length > 1) { const authors: string[] = []; const formattedCommits: string[] = []; diff --git a/tools/tasks/misc/createModList.ts b/tools/tasks/misc/createModList.ts index 325f4ac..3ddfac8 100644 --- a/tools/tasks/misc/createModList.ts +++ b/tools/tasks/misc/createModList.ts @@ -30,12 +30,11 @@ export async function createModList(tag = ""): Promise { // Fetch mod/addon & file infos, discard result. Further calls will hit cache. await fetchProjectsBulk(manifest.files.map((mod) => mod.projectID)); await fetchFilesBulk( - // Use this instead of referencing the original array, as .sort sorts the input array - [...manifest.files] - .sort((a, b) => a.fileID - b.fileID) + manifest.files .map((mod) => { return { projectID: mod.projectID, fileID: mod.fileID }; - }), + }) + .sort((a, b) => a.fileID - b.fileID), ); log("Fetched Infos. Creating modlist...");