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 7a61577 commit b1aa7ee
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 @@ -88,7 +88,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 b1aa7ee

Please sign in to comment.