From 72ca2fc92f4ea4f9b5f5d799c396b5985452fdd0 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Tue, 14 Mar 2023 17:06:25 +0000 Subject: [PATCH] Replace slice with startsWith --- packages/core/src/internal/fetchSource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/internal/fetchSource.ts b/packages/core/src/internal/fetchSource.ts index 37c45c913a..062c65be2c 100644 --- a/packages/core/src/internal/fetchSource.ts +++ b/packages/core/src/internal/fetchSource.ts @@ -91,7 +91,7 @@ async function* fetchOperation( : makeResult(operation, payload, response)); } catch (_error) {} - if (next.slice(0, 2) === '--' || (payload && !payload.hasNext)) { + if (next.startsWith('--') || (payload && !payload.hasNext)) { if (!result) yield makeResult(operation, {}, response); break chunks; }