From 40427bcbc14b52ebdd0414828ab3dcd108ae27fc Mon Sep 17 00:00:00 2001 From: KevinK <31565174+kevzzsk@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:00:29 +0800 Subject: [PATCH] fix(sdk): split check for empty string (#125) --- packages/sdk/src/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/src/utils/index.ts b/packages/sdk/src/utils/index.ts index 795fce3b..dc67631e 100644 --- a/packages/sdk/src/utils/index.ts +++ b/packages/sdk/src/utils/index.ts @@ -293,7 +293,7 @@ export const splitInscriptionId = (inscriptionId: string) => { throw new OrditSDKError(`Invalid inscriptionId: ${inscriptionId}`) } const indexNum = Number(index) - if (Number.isNaN(indexNum) || indexNum < 0 || index !== "") { + if (Number.isNaN(indexNum) || indexNum < 0 || index === "") { throw new OrditSDKError(`Invalid inscriptionId: ${inscriptionId}`) }