Skip to content

Commit

Permalink
chore: Linter auto-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Nov 8, 2019
1 parent f4e59bc commit bce11e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/browser/src/sdk.ts
Expand Up @@ -163,5 +163,5 @@ export function close(timeout?: number): PromiseLike<boolean> {
* @returns The result of wrapped function call.
*/
export function wrap(fn: Function): any {
return internalWrap(fn)();
return internalWrap(fn)(); // tslint:disable-line:no-unsafe-any
}
18 changes: 13 additions & 5 deletions packages/core/src/integrations/inboundfilters.ts
Expand Up @@ -87,7 +87,14 @@ export class InboundFilters implements Integration {
}

try {
return event && event.exception && event.exception.values && event.exception.values[0] && event.exception.values[0].type === 'SentryError' || false;
return (
(event &&
event.exception &&
event.exception.values &&
event.exception.values[0] &&
event.exception.values[0].type === 'SentryError') ||
false
);
} catch (_oO) {
return false;
}
Expand Down Expand Up @@ -146,7 +153,7 @@ export class InboundFilters implements Integration {
}
if (event.exception) {
try {
const { type = '', value = '' } = event.exception.values && event.exception.values[0] || {};
const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};
return [`${value}`, `${type}: ${value}`];
} catch (oO) {
logger.error(`Cannot extract message for event ${getEventDescription(event)}`);
Expand All @@ -161,11 +168,12 @@ export class InboundFilters implements Integration {
try {
if (event.stacktrace) {
const frames = event.stacktrace.frames;
return frames && frames[frames.length - 1].filename || null;
return (frames && frames[frames.length - 1].filename) || null;
}
if (event.exception) {
const frames = event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;
return frames && frames[frames.length - 1].filename || null;
const frames =
event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;
return (frames && frames[frames.length - 1].filename) || null;
}
return null;
} catch (oO) {
Expand Down

0 comments on commit bce11e5

Please sign in to comment.