Skip to content

Commit

Permalink
fix(about-page): render undefined date strings as "N/A" (v34)
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikThePendric committed Feb 24, 2020
1 parent 98358cc commit 537e341
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion i18n/module/i18n_module_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,5 @@ no=No
password_changed_successfully=Password changed successfully
login_again=You need to login again to continue using the application.
login=Login
login=Login
not_applicable=N/A
6 changes: 6 additions & 0 deletions src/aboutPage/AboutPage.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import PropTypes from 'prop-types';

import AboutSection from './AboutSection.component';



const parseDateFromUTCString = (utcString, d2) => {
if (!utcString) {
return d2.i18n.getTranslation('not_applicable')
}

const locale = d2.currentUser.userSettings.settings.keyUiLocale;
const date = new Date(utcString);
const options = {
Expand Down

0 comments on commit 537e341

Please sign in to comment.