fix yarn web

This commit is contained in:
Sandeep Somavarapu
2021-07-26 15:49:08 +02:00
parent 4d4e92713c
commit 460d3c40b1

View File

@@ -424,7 +424,7 @@ async function handleRoot(req, res) {
);
const openFileUrl = args['open-file'] ? url.parse(args['open-file'], true) : undefined;
let selection;
if (openFileUrl.hash) {
if (openFileUrl?.hash) {
const rangeMatch = /L(?<startLineNumber>\d+)(?::(?<startColumn>\d+))?((?:-L(?<endLineNumber>\d+))(?::(?<endColumn>\d+))?)?/.exec(openFileUrl.hash);
if (rangeMatch?.groups) {
const { startLineNumber, startColumn, endLineNumber, endColumn } = rangeMatch.groups;