Skip to content

Commit

Permalink
Merge pull request #681 from elmadev/fixcasingints
Browse files Browse the repository at this point in the history
fix(other): fix casing for internal levels
  • Loading branch information
sunehs authored Apr 23, 2024
2 parents 8f220b1 + 7ba264f commit 827bbce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/taswr.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const getInternalLevelFromName = async LevelName => {
'QWQUU054.LEV': 17,
};

const LevelIndex = internalLevelMap[LevelName];
const LevelIndex = internalLevelMap[LevelName.toUpperCase()];

if (!LevelIndex) {
return null;
Expand Down Expand Up @@ -139,7 +139,7 @@ export const getDatInfo = async (datFile, filename, LevelIndex) => {
const LevelName = findLevelNameFromDat(datFilePath);
let lev;

if (/^QWQUU\d{3}\.LEV$/.test(LevelName)) {
if (/^QWQUU\d{3}\.LEV$/i.test(LevelName)) {
lev = await getInternalLevelFromName(LevelName);
} else if (LevelIndex) {
lev = await Level.findOne({
Expand Down

0 comments on commit 827bbce

Please sign in to comment.