unprint 0.18.17 → 0.18.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/app.js +5 -1
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -376,7 +376,11 @@ function prefixUrl(urlPath, originUrl, customOptions) {
|
|
|
376
376
|
|
|
377
377
|
const origin = originUrl?.replace(/^.*?:/, `${options.protocol}:`);
|
|
378
378
|
|
|
379
|
-
|
|
379
|
+
try {
|
|
380
|
+
return new URL(urlPath, origin).href;
|
|
381
|
+
} catch {
|
|
382
|
+
return null;
|
|
383
|
+
}
|
|
380
384
|
}
|
|
381
385
|
|
|
382
386
|
function queryUrl(context, selector = 'a', customOptions) {
|