Skip to content

chore: clean up unused catch clause parameters #13481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class InteractivityChecker {
function getFrameElement(window: Window) {
try {
return window.frameElement as HTMLElement;
} catch (e) {
} catch {
return null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/toolbar/toolbar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('MatToolbar', () => {
fixture.componentInstance.showToolbarRow = true;
fixture.detectChanges();
flush();
} catch (e) {
} catch {
flush();
}
}).toThrowError(/attempting to combine different/i);
Expand Down
2 changes: 1 addition & 1 deletion tools/dashboard/functions/jwt/verify-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function verifyToken(token: string): boolean {
}

return true;
} catch (e) {
} catch {
return false;
}
}
7 changes: 3 additions & 4 deletions tools/gulp/util/task_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ const {projectDir} = buildConfig;

/** If the string passed in is a glob, returns it, otherwise append '**\/*' to it. */
function _globify(maybeGlob: string, suffix = '**/*') {
if (maybeGlob.indexOf('*') != -1) {
if (maybeGlob.indexOf('*') > -1) {
return maybeGlob;
}
try {
const stat = fs.statSync(maybeGlob);
if (stat.isFile()) {
if (fs.statSync(maybeGlob).isFile()) {
return maybeGlob;
}
} catch (e) {}
} catch {}
return path.join(maybeGlob, suffix);
}

Expand Down