From 3331f8abd25b6b58255f77718d610c38ba472096 Mon Sep 17 00:00:00 2001 From: jacob Date: Mon, 25 Sep 2023 10:51:31 -0500 Subject: [PATCH] account for typeof number as well --- src/create-publish.mts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/create-publish.mts b/src/create-publish.mts index fb8d03e..b3cb680 100644 --- a/src/create-publish.mts +++ b/src/create-publish.mts @@ -129,9 +129,10 @@ const makeDescription = (type: number, desc: string) => { return desc; }; const serialize = (permissions: unknown) => { - if(typeof permissions === 'bigint') { + if(typeof permissions === 'bigint' || typeof permissions === 'number') { return permissions.toString(); } + if(Array.isArray(permissions)) { return permissions .reduce((acc, cur) => acc | cur, BigInt(0))