Use optional catch binding

Co-Authored-By: itaisteinherz <itaisteinherz@gmail.com>
This commit is contained in:
Sindre Sorhus 2018-12-09 15:31:53 +02:00 committed by GitHub
parent bd9ea506c4
commit d579c6625c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,7 +198,7 @@ namespace is { // tslint:disable-line:no-namespace
try {
new URL(value); // tslint:disable-line no-unused-expression
return true;
} catch (_) { // tslint:disable-line no-unused
} catch {
return false;
}
};