'use strict'

module.exports = resolve

function resolve(h, url) {
  if (url === null || url === undefined) {
    return ''
  }

  return h.frozenBaseURL ? String(new URL(url, h.frozenBaseURL)) : url
}

'use strict'

module.exports = resolve

function resolve(h, url) {
  if (url === null || url === undefined) {
    return ''
  }

  if (h.frozenBaseURL && typeof URL !== 'undefined') {
    return String(new URL(url, h.frozenBaseURL))
  }

  return url
}

Fix error when using `<base>` without `URL`
Fix error when using `<base>` without `URL`

Related to cf92230.
