Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: fixed lint
  • Loading branch information
kkruk-sumo committed May 24, 2021
commit 4cc06db8131f9c74f544e660400af5629870d7de
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ export class DocumentLoadInstrumentation extends InstrumentationBase<unknown> {
* @param rootSpan
*/
private _addResourcesSpans(rootSpan: Span): void {
const resources: PerformanceResourceTiming[] = ((otperformance as unknown) as Performance).getEntriesByType?.(
'resource'
) as PerformanceResourceTiming[];
const resources: PerformanceResourceTiming[] = (
otperformance as unknown as Performance
).getEntriesByType?.('resource') as PerformanceResourceTiming[];
if (resources) {
resources.forEach(resource => {
this._initResourceSpan(resource, rootSpan);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import { EventNames } from './enums/EventNames';

export const getPerformanceNavigationEntries = (): PerformanceEntries => {
const entries: PerformanceEntries = {};
const performanceNavigationTiming = ((otperformance as unknown) as Performance).getEntriesByType?.(
'navigation'
)[0] as PerformanceEntries;
const performanceNavigationTiming = (
otperformance as unknown as Performance
).getEntriesByType?.('navigation')[0] as PerformanceEntries;

if (performanceNavigationTiming) {
const keys = Object.values(PTN);
Expand Down Expand Up @@ -66,9 +66,9 @@ const performancePaintNames = {
};

export const addSpanPerformancePaintEvents = (span: Span) => {
const performancePaintTiming = ((otperformance as unknown) as Performance).getEntriesByType?.(
'paint'
);
const performancePaintTiming = (
otperformance as unknown as Performance
).getEntriesByType?.('paint');
if (performancePaintTiming) {
performancePaintTiming.forEach(({ name, startTime }) => {
if (hasKey(performancePaintNames, name)) {
Expand Down