1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-11 22:03:31 +00:00

Remove empty catch blocks, and update tslint rule (#513)

This commit is contained in:
Oscar Hinton
2021-10-19 10:32:14 +02:00
committed by GitHub
parent 62011628d0
commit f09fb69882
38 changed files with 228 additions and 85 deletions

View File

@@ -238,7 +238,9 @@ export class Utils {
const urlDomain = tldjs != null && tldjs.getDomain != null ? tldjs.getDomain(url.hostname) : null;
return urlDomain != null ? urlDomain : url.hostname;
} catch (e) { }
} catch (e) {
// Invalid domain, try another approach below.
}
}
try {
@@ -367,7 +369,9 @@ export class Utils {
anchor.href = uriString;
return anchor as any;
}
} catch (e) { }
} catch (e) {
// Ignore error
}
return null;
}