We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f9b873 commit 4ed61fcCopy full SHA for 4ed61fc
src/common/url/extract-url.js
@@ -10,8 +10,8 @@ import { gosNREUMOriginals } from '../window/nreum'
10
* @param {string|Request|URL} target - The target to extract the URL from. It can be a string, a Fetch Request object, or a URL object.
11
* @returns {string|undefined} The extracted URL as a string, or undefined if the target type is not supported.
12
*/
13
-export function extractUrl(target) {
14
- if (typeof target === 'string') return target
+export function extractUrl (target) {
+ if (typeof target === 'string') return target
15
else if (target instanceof gosNREUMOriginals().o.REQ) return target.url
16
else if (globalScope?.URL && target instanceof URL) return target.href
17
}
0 commit comments