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 abaac0e commit 72ca2fc
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 @@ -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;
}
Expand Down

0 comments on commit 72ca2fc

Please sign in to comment.