Fixing small issue with displaying activity log

Этот коммит содержится в:
=Corey Hulen
2016-01-27 10:07:26 -05:00
родитель b7606da40f
Коммит 41013daa0b
3 изменённых файлов: 7 добавлений и 2 удалений

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

@@ -100,10 +100,10 @@ export default class ActivityLogModal extends React.Component {
if (currentSession.props.platform === 'Windows') {
devicePicture = 'fa fa-windows';
} else if (currentSession.device_id.indexOf('apple:') === 0) {
} else if (currentSession.device_id && currentSession.device_id.indexOf('apple:') === 0) {
devicePicture = 'fa fa-apple';
devicePlatform = 'iPhone Native App';
} else if (currentSession.device_id.indexOf('android:') === 0) {
} else if (currentSession.device_id && currentSession.device_id.indexOf('android:') === 0) {
devicePlatform = 'Android Native App';
devicePicture = 'fa fa-android';
} else if (currentSession.props.platform === 'Macintosh' ||

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

@@ -82,6 +82,7 @@ export default class ErrorBar extends React.Component {
e.preventDefault();
}
ErrorStore.clearLastError();
this.setState({message: null});
}

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

@@ -46,6 +46,10 @@ class ErrorStoreClass extends EventEmitter {
storeLastError(error) {
BrowserStore.setItem('last_error', error);
}
clearLastError() {
BrowserStore.removeItem('last_error');
}
}
var ErrorStore = new ErrorStoreClass();