@forge/egress
1.2.131.3.0-next.0
out/egress/url-parser.jsout/egress/url-parser.js+1−2
Index: package/out/egress/url-parser.js
===================================================================
--- package/out/egress/url-parser.js
+++ package/out/egress/url-parser.js
@@ -1,10 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseUrl = void 0;
function parseUrl(url) {
- var _a, _b;
- const protocol = (_b = (_a = url.match(/^(.*?:)/)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : 'https:';
+ const protocol = url.match(/^(.*?:)/)?.[0] ?? 'https:';
const hostname = url
.replace(protocol, '')
.replace(/^\/*/, '')
.split(/[\?\/]/)[0];