Bug 1517349 - [release 115] Fix linting issue in visibleBreakpoints (#7638). r=dwalsh

This commit is contained in:
Jason Laster 2019-01-02 17:02:39 -05:00
Родитель c5c0bd1807
Коммит 2cdebcf5d2
2 изменённых файлов: 11 добавлений и 10 удалений

Просмотреть файл

@ -27,8 +27,12 @@ export function toServerLocation(location: SourceLocation): ServerLocation {
}; };
} }
export function createFrame(frame: any): ChromeFrame { export function createFrame(frame: any): ?ChromeFrame {
const location = fromServerLocation(frame.location); const location = fromServerLocation(frame.location);
if (!location) {
return null;
}
return { return {
id: frame.callFrameId, id: frame.callFrameId,
displayName: frame.functionName, displayName: frame.functionName,

Просмотреть файл

@ -72,13 +72,10 @@ export const getVisibleBreakpoints: Selector<?(Breakpoint[])> = createSelector(
*/ */
export const getFirstVisibleBreakpoints: Selector< export const getFirstVisibleBreakpoints: Selector<
Breakpoint[] Breakpoint[]
> = createSelector( > = createSelector(getVisibleBreakpoints, breakpoints => {
getVisibleBreakpoints,
breakpoints => {
if (!breakpoints) { if (!breakpoints) {
return []; return [];
} }
return (uniqBy(sortBreakpoints(breakpoints), bp => bp.location.line): any); return (uniqBy(sortBreakpoints(breakpoints), bp => bp.location.line): any);
} });
);