Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Eslint with recommend extention (small fixes #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
damianprzygodzki committed Feb 16, 2017
1 parent f5d474d commit 8be261c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
21 changes: 0 additions & 21 deletions src/actions/AppActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,24 +208,3 @@ export function postImageAction (data) {
return axios.post(`${config.API_URL}/image`, data)
.then(response => response.data);
}

export function makeCancelable (promise) {
let hasCanceled_ = false;

const wrappedPromise = new Promise((resolve, reject) => {
promise.then((val) =>
hasCanceled_ ? reject({isCanceled: true}) : resolve(val)
);

promise.catch((error) =>
hasCanceled_ ? reject({isCanceled: true}) : reject(error)
);
});

return {
promise: wrappedPromise,
cancel() {
hasCanceled_ = true;
},
};
};
4 changes: 0 additions & 4 deletions src/components/app/QuickActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import {
quickActionsRequest
} from '../../actions/ListActions';

import {
makeCancelable
} from '../../actions/AppActions';

import {
openModal
} from '../../actions/WindowActions';
Expand Down

0 comments on commit 8be261c

Please sign in to comment.