Skip to content

refactor(sdk): simplify numberize early returns#8

Open
Tozarin wants to merge 1 commit into
new_mainfrom
agent-bench/nocodb-fix-pr-comments
Open

refactor(sdk): simplify numberize early returns#8
Tozarin wants to merge 1 commit into
new_mainfrom
agent-bench/nocodb-fix-pr-comments

Conversation

@Tozarin
Copy link
Copy Markdown
Collaborator

@Tozarin Tozarin commented May 7, 2026

No description provided.

Signed-off-by: Старцев Матвей <tozarin@yandex.ru>
Comment on lines +12 to +13

const result = parseInt(value);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseInt без radix - потенциальный баг (parseInt('0x10') === 16). Передай радикс явно: parseInt

Comment on lines +14 to +17

if (isNaN(result)) {
return undefined;
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseInt вернёт 123 - пройдёт мимо isNaN и вернёт частично распарсенное число. Замени на Number или добавь pre-check /^-?\d+$/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant