mirror of
https://github.com/diced/zipline.git
synced 2025-12-05 20:40:12 -08:00
fix: incorrect hex parsing (#736)
This commit is contained in:
@@ -39,7 +39,10 @@ export type WebhooksExecuteBody = {
|
||||
};
|
||||
|
||||
export function hexString(value?: string | null): number | null {
|
||||
return value ? (isNaN(parseInt(value, 16)) ? null : parseInt(value, 16)) : null;
|
||||
if (!value) return null;
|
||||
|
||||
const parsed = parseInt(value.replace(/^#/, ''), 16);
|
||||
return isNaN(parsed) ? null : parsed;
|
||||
}
|
||||
|
||||
export function parseContent(
|
||||
|
||||
Reference in New Issue
Block a user