[Refactoring] [Attempt to fix crash]
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import {showWindow, shutdownApplication} from './common_actions';
|
||||
import {
|
||||
showWindow,
|
||||
shutdownApplication
|
||||
} from './common_actions';
|
||||
|
||||
let ErrorActions = [];
|
||||
|
||||
@@ -27,7 +30,7 @@ export const dismissError = () => {
|
||||
export const notifyError = (msg, critical, callback) => {
|
||||
return dispatch => {
|
||||
ErrorActions = [callback, ...ErrorActions];
|
||||
msg = msg.toString();
|
||||
msg = msg ? msg.toString() : 'Unknown Error';
|
||||
dispatch(setErrorInfo(msg, critical));
|
||||
dispatch(showWindow());
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import axios from 'axios';
|
||||
import * as Constants from '../../constants';
|
||||
import {createAction} from 'redux-starter-kit';
|
||||
import {setApplicationReady} from './common_actions';
|
||||
import {notifyError} from './error_actions';
|
||||
import {setApplicationReady} from './common_actions';
|
||||
|
||||
export const CLEAR_UI_UPGRADE = 'relver/clearUIUpgrade';
|
||||
export const clearUIUpgrade = () => {
|
||||
@@ -75,7 +75,7 @@ export const loadReleases = () => {
|
||||
}));
|
||||
dispatchActions(locationsLookup, versionLookup);
|
||||
}).catch(error => {
|
||||
const releases = window.localStorage.getItem('releases');
|
||||
const releases = localStorage.getItem('releases');
|
||||
if (releases && (releases.length > 0)) {
|
||||
const obj = JSON.parse(releases);
|
||||
const locationsLookup = obj.LocationsLookup;
|
||||
|
||||
Reference in New Issue
Block a user