Skip to content

Commit 244111b

Browse files
crisbetojosephperrott
authored andcommitted
chore: clean up unused catch clause parameters (#13481)
1 parent 85741e0 commit 244111b

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/cdk/a11y/interactivity-checker/interactivity-checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export class InteractivityChecker {
150150
function getFrameElement(window: Window) {
151151
try {
152152
return window.frameElement as HTMLElement;
153-
} catch (e) {
153+
} catch {
154154
return null;
155155
}
156156
}

src/lib/toolbar/toolbar.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('MatToolbar', () => {
7979
fixture.componentInstance.showToolbarRow = true;
8080
fixture.detectChanges();
8181
flush();
82-
} catch (e) {
82+
} catch {
8383
flush();
8484
}
8585
}).toThrowError(/attempting to combine different/i);

tools/dashboard/functions/jwt/verify-token.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function verifyToken(token: string): boolean {
1818
}
1919

2020
return true;
21-
} catch (e) {
21+
} catch {
2222
return false;
2323
}
2424
}

tools/gulp/util/task_helpers.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ const {projectDir} = buildConfig;
1616

1717
/** If the string passed in is a glob, returns it, otherwise append '**\/*' to it. */
1818
function _globify(maybeGlob: string, suffix = '**/*') {
19-
if (maybeGlob.indexOf('*') != -1) {
19+
if (maybeGlob.indexOf('*') > -1) {
2020
return maybeGlob;
2121
}
2222
try {
23-
const stat = fs.statSync(maybeGlob);
24-
if (stat.isFile()) {
23+
if (fs.statSync(maybeGlob).isFile()) {
2524
return maybeGlob;
2625
}
27-
} catch (e) {}
26+
} catch {}
2827
return path.join(maybeGlob, suffix);
2928
}
3029

0 commit comments

Comments
 (0)