Skip to content

Commit 02e3ec3

Browse files
committed
After CR
1 parent 0703b21 commit 02e3ec3

File tree

1 file changed

+3
-3
lines changed
  • src/bundle/Resources/public/js/scripts/fieldType

1 file changed

+3
-3
lines changed

src/bundle/Resources/public/js/scripts/fieldType/ezurl.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
}
2424

2525
if (!isEmpty) {
26-
try {
27-
new URL(urlValue);
28-
} catch (error) {
26+
const isUrlValid = URL.canParse(urlValue);
27+
28+
if (!isUrlValid) {
2929
result.isError = true;
3030
result.errorMessage = ibexa.errors.invalidUrl;
3131
}

0 commit comments

Comments
 (0)