remove async/await code

This commit is contained in:
Sean Yesmunt 2018-10-30 13:07:55 -04:00
parent 78c27b4601
commit 2536d46cdf
2 changed files with 68 additions and 68 deletions

View file

@ -205,7 +205,7 @@ export const doRemoveUnreadSubscription = (channelUri: string, readUri: string)
dispatch(doRemoveUnreadSubscriptions(channelUri, [readUri]));
};
export const doCheckSubscription = (subscriptionUri: string, shouldNotify?: boolean) => async (
export const doCheckSubscription = (subscriptionUri: string, shouldNotify?: boolean) => (
dispatch: ReduxDispatch,
getState: GetState
) => {
@ -223,7 +223,7 @@ export const doCheckSubscription = (subscriptionUri: string, shouldNotify?: bool
);
}
const claimListByChannel = await Lbry.claim_list_by_channel({ uri: subscriptionUri, page: 1 });
Lbry.claim_list_by_channel({ uri: subscriptionUri, page: 1 }).then(claimListByChannel => {
const claimResult = claimListByChannel[subscriptionUri] || {};
const { claims_in_channel: claimsInChannel } = claimResult;
@ -303,6 +303,7 @@ export const doCheckSubscription = (subscriptionUri: string, shouldNotify?: bool
page: 1,
},
});
});
};
export const doChannelSubscribe = (subscription: Subscription) => (

View file

@ -13,7 +13,6 @@ const isDev = PROCESS_ARGV && PROCESS_ARGV.original &&
module.exports = {
// This rule is temporarily necessary until https://github.com/electron-userland/electron-webpack/issues/60 is fixed.
entry: ['babel-polyfill', `${ELECTRON_RENDERER_PROCESS_ROOT}/index.js`],
module: {
rules: [
{