diff --git a/tools/find-inactive-collaborators.mjs b/tools/find-inactive-collaborators.mjs index 0787c634a1a4c9..f6062b046391fa 100755 --- a/tools/find-inactive-collaborators.mjs +++ b/tools/find-inactive-collaborators.mjs @@ -163,7 +163,7 @@ async function moveCollaboratorToEmeritus(peopleToMove) { const currentLine = `${collaboratorFirstLine}\n${line}\n`; // If textToMove is empty, this still works because when undefined is // used in a comparison with <, the result is always false. - while (textToMove[0] < currentLine) { + while (textToMove[0]?.toLowerCase() < currentLine.toLowerCase()) { fileContents += textToMove.shift(); } fileContents += currentLine; diff --git a/tools/find-inactive-tsc.mjs b/tools/find-inactive-tsc.mjs index fe204d5b673e59..5fc31bc745dc80 100755 --- a/tools/find-inactive-tsc.mjs +++ b/tools/find-inactive-tsc.mjs @@ -198,7 +198,7 @@ async function moveTscToEmeritus(peopleToMove) { const currentLine = `${memberFirstLine}\n${line}\n`; // If textToMove is empty, this still works because when undefined is // used in a comparison with <, the result is always false. - while (textToMove[0] < currentLine) { + while (textToMove[0]?.toLowerCase() < currentLine.toLowerCase()) { fileContents += textToMove.shift(); } fileContents += currentLine;