You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't exactly know why this happens, but it becomes a breaking bug in graphene. removePadding(text: string) specifically cannot handle undefined as a parameter.
I tried making a patch for this, but I'm not really sure where this should be handled idiomatically.
For now I'm just patching core/type.ts:
diff --git a/src/core/type.ts b/src/core/type.ts
index 1b3c2b0..e0eb075 100644
--- a/src/core/type.ts+++ b/src/core/type.ts@@ -84,5 +84,5 @@ export function isFlag(v: number, fv: number) {
* @param text Formatted string
*/
export function removePadding(text: string) {
- return text.replace(/\0.*/g, "").trim();+ return text ? text.replace(/\0.*/g, "").trim() : text;
}
The text was updated successfully, but these errors were encountered:
It seems that the issue might not lie with graphene, but rather with pkcs11js. Based on the script you've shared, it appears that the C_GetInfo function is returning an empty object. This shouldn't be the case, as there should definitely be a structure returned. We need to understand why this is happening. What version of nodejs are you using? pkcs11js is a C plugin for nodejs that gets compiled during the module installation. It's possible that there have been changes in the native API, causing the module to not function as expected.
I don't exactly know why this happens, but it becomes a breaking bug in graphene.
removePadding(text: string)
specifically cannot handleundefined
as a parameter.I tried making a patch for this, but I'm not really sure where this should be handled idiomatically.
For now I'm just patching
core/type.ts
:The text was updated successfully, but these errors were encountered: