Nixinova/Minecraft-Versions

Crash when edition or phase is spelt incorrectly

Nixinova opened this issue · 0 comments

When the version number is specified, the typo checking doesn't get applied, causing a crash

C:\Users\Nixinova\Documents\GitHub>mcdata jav
Invalid input. Type 'mcdata --help' for help.

C:\Users\Nixinova\Documents\GitHub>mcdata java relesae
Invalid input. Type 'mcdata --help' for help.

C:\Users\Nixinova\Documents\GitHub>mcdata java relesae 1.17.2
C:\Users\Nixinova\AppData\Roaming\npm\node_modules\minecraft-vers\dist\cli.js:20
    versionList = versionTable[version];
                              ^

TypeError: Cannot read properties of undefined (reading '1.17.2')
    at getData (C:\Users\Nixinova\AppData\Roaming\npm\node_modules\minecraft-vers\dist\cli.js:20:31)
    at Object.<anonymous> (C:\Users\Nixinova\AppData\Roaming\npm\node_modules\minecraft-vers\dist\cli.js:89:5)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\Nixinova\AppData\Roaming\npm\node_modules\minecraft-vers\bin\index.js:2:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)