-
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
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;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
