mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
fix: tighter numerical tank name inference
This commit is contained in:
1 parent
889ae39e3b
commit
8e216ebe46
1 file changed
+1
-1
@@ -13,7 +13,7 @@ export default async function resolveTankId(
|
|||||||
locale: Locale,
|
locale: Locale,
|
||||||
) {
|
) {
|
||||||
const { translate } = translator(locale);
|
const { translate } = translator(locale);
|
||||||
const number = typeof tank === 'string' ? parseInt(tank) : tank;
|
const number = typeof tank === 'string' ? Number(tank) : tank;
|
||||||
|
|
||||||
if (Number.isNaN(number)) {
|
if (Number.isNaN(number)) {
|
||||||
const searchResult = go(`${tank}`, await tanksDefinitionsArray, {
|
const searchResult = go(`${tank}`, await tanksDefinitionsArray, {
|
||||||
|
|||||||
Reference in new issue
Block a user