Skip to content

Commit c17d85b

Browse files
undefined check on response
1 parent 96b2e9a commit c17d85b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/processSnapshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
155155
} else if (!ALLOWED_STATUSES.includes(response.status())) {
156156
ctx.log.debug(`${globalViewport} Handling request ${requestUrl}\n - skipping disallowed status [${response.status()}]`);
157157

158-
if (response.headers()) {
158+
if (response && response.headers()) {
159159
const responseHeaders = response.headers();
160160
ctx.log.debug(`Response headers for ${requestUrl}: ${JSON.stringify(responseHeaders, null, 2)}`);
161161
}

0 commit comments

Comments
 (0)