diff --git a/src/components/ui/form/Form.js b/src/components/ui/form/Form.js
index 48f4be0..cfc110a 100644
--- a/src/components/ui/form/Form.js
+++ b/src/components/ui/form/Form.js
@@ -113,9 +113,9 @@ export default class Form extends Component
{
Promise.resolve(this.props.onSubmit(
this.props.form ? this.props.form : new FormData(form)
))
- .catch((errors: {[key: string]: string}) => {
- this.setErrors(errors);
- });
+ .catch((errors: {[key: string]: string}) => {
+ this.setErrors(errors);
+ });
} else {
const invalidEls = form.querySelectorAll(':invalid');
const errors = {};
diff --git a/src/index.js b/src/index.js
index 0f51030..60096ef 100644
--- a/src/index.js
+++ b/src/index.js
@@ -34,24 +34,24 @@ Promise.all([
userFactory(store),
font.load(['Roboto', 'Roboto Condensed'])
])
-.then(() => {
- ReactDOM.render(
-
-
-
-
-
- null} />
-
-
-
-
- ,
- document.getElementById('app')
- );
+ .then(() => {
+ ReactDOM.render(
+
+
+
+
+
+ null} />
+
+
+
+
+ ,
+ document.getElementById('app')
+ );
- initAnalytics();
-});
+ initAnalytics();
+ });
import { loadScript, debounce } from 'functions';
const trackPageView = debounce(_trackPageView);
diff --git a/src/services/api/authentication.js b/src/services/api/authentication.js
index bf71c04..a4cf0e5 100644
--- a/src/services/api/authentication.js
+++ b/src/services/api/authentication.js
@@ -95,19 +95,19 @@ const authentication = {
resolve();
})
- .then(() => accounts.current({token}))
- .then((user) => ({token, refreshToken, user}))
- .catch((resp) => {
- if (resp.message === 'Token expired') {
- return authentication.requestToken(refreshToken)
- .then(({token}) =>
- accounts.current({token})
- .then((user) => ({token, refreshToken, user}))
- );
- }
+ .then(() => accounts.current({token}))
+ .then((user) => ({token, refreshToken, user}))
+ .catch((resp) => {
+ if (resp.message === 'Token expired') {
+ return authentication.requestToken(refreshToken)
+ .then(({token}) =>
+ accounts.current({token})
+ .then((user) => ({token, refreshToken, user}))
+ );
+ }
- return Promise.reject(resp);
- });
+ return Promise.reject(resp);
+ });
},
/**
diff --git a/src/services/authFlow/MfaState.js b/src/services/authFlow/MfaState.js
index 226da57..5d8a31e 100644
--- a/src/services/authFlow/MfaState.js
+++ b/src/services/authFlow/MfaState.js
@@ -37,10 +37,10 @@ export default class MfaState extends AbstractState {
rememberMe,
login
})
- .then(() => context.setState(new CompleteState()))
- .catch((err = {}) =>
- err.errors || logger.warn('Error logging in', err)
- );
+ .then(() => context.setState(new CompleteState()))
+ .catch((err = {}) =>
+ err.errors || logger.warn('Error logging in', err)
+ );
}
goBack(context: AuthContext) {
diff --git a/src/services/authFlow/PasswordState.js b/src/services/authFlow/PasswordState.js
index b04f2e1..38de0fb 100644
--- a/src/services/authFlow/PasswordState.js
+++ b/src/services/authFlow/PasswordState.js
@@ -38,18 +38,18 @@ export default class PasswordState extends AbstractState {
rememberMe,
login
})
- .then(() => {
- const {isTotpRequired} = getCredentials(context.getState());
+ .then(() => {
+ const {isTotpRequired} = getCredentials(context.getState());
- if (isTotpRequired) {
- return context.setState(new MfaState());
- }
+ if (isTotpRequired) {
+ return context.setState(new MfaState());
+ }
- return context.setState(new CompleteState());
- })
- .catch((err = {}) =>
- err.errors || logger.warn('Error logging in', err)
- );
+ return context.setState(new CompleteState());
+ })
+ .catch((err = {}) =>
+ err.errors || logger.warn('Error logging in', err)
+ );
}
reject(context: AuthContext) {
diff --git a/src/services/request/request.js b/src/services/request/request.js
index 72968f7..aeca0be 100644
--- a/src/services/request/request.js
+++ b/src/services/request/request.js
@@ -117,8 +117,7 @@ function doFetch(url, options = {}) {
.then(toJSON, rejectWithJSON)
.then(handleResponseSuccess)
.then((resp) => middlewareLayer.run('then', resp, {url, options}))
- .catch((resp) => middlewareLayer.run('catch', resp, {url, options}, () => doFetch(url, options)))
- ;
+ .catch((resp) => middlewareLayer.run('catch', resp, {url, options}, () => doFetch(url, options)));
}
/**
@@ -159,6 +158,5 @@ function buildQuery(data: Object = {}): string {
.map(encodeURIComponent)
.join('=')
)
- .join('&')
- ;
+ .join('&');
}