Skip to content

Commit

Permalink
Replace slice with startsWith
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Mar 14, 2023
1 parent 4ff660f commit 7d0f741
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/internal/fetchSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,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;
}
Expand Down

0 comments on commit 7d0f741

Please sign in to comment.