Skip to content

Commit

Permalink
initialize offset
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchambers committed Jan 14, 2024
1 parent c0a0752 commit 5c238a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/doctest.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const rewriteJs = sourceType => ({
// 2: Preserve source text between comments
const chunks = [];
{
let offset;
let offset = 0;
for (const {start, end} of comments) {
chunks.push ([offset, input.slice (offset, start)]);
offset = end;
Expand Down

0 comments on commit 5c238a0

Please sign in to comment.