mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 22:42:32 -05:00
add can parse polyfill
This commit is contained in:
1 parent
a46c42c3a0
commit
98055f0762
1 file changed
+12
@@ -592,6 +592,18 @@ import AppearsOn from './appears_on'
|
||||
import i18n from './i18n'
|
||||
import { sanitizeUrl } from '@braintree/sanitize-url'
|
||||
|
||||
if (typeof URL.canParse !== 'function') {
|
||||
URL.canParse = function (url, base) {
|
||||
try {
|
||||
const parsed = new URL(url, base)
|
||||
|
||||
return !!parsed
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const isEmpty = (obj) => {
|
||||
if (obj == null) return true
|
||||
|
||||
|
||||
Reference in new issue
Block a user