Skip to content

Commit

Permalink
fix(sidebar): replace Number.isFinite with lodash/isFinite ie11 (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanDeMicco authored Dec 4, 2018
1 parent c052b93 commit dda23b9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/ContentSidebar/SidebarAccessStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import React from 'react';
import AccessStats from 'box-react-ui/lib/features/access-stats/AccessStats';
import isFinite from 'lodash/isFinite';
import { injectIntl, FormattedMessage } from 'react-intl';
import SidebarSection from './SidebarSection';
import messages from '../messages';
Expand Down Expand Up @@ -33,10 +34,10 @@ const SidebarAccessStats = ({
const { preview_count, comment_count, download_count, edit_count } = accessStats;

if (
!Number.isFinite(preview_count) &&
!Number.isFinite(comment_count) &&
!Number.isFinite(download_count) &&
!Number.isFinite(edit_count) &&
!isFinite(preview_count) &&
!isFinite(comment_count) &&
!isFinite(download_count) &&
!isFinite(edit_count) &&
!error
) {
return null;
Expand Down

0 comments on commit dda23b9

Please sign in to comment.