Skip to content

Commit

Permalink
fix: just forward the promise.
Browse files Browse the repository at this point in the history
  • Loading branch information
r0xsh committed Nov 21, 2024
1 parent 3315760 commit f0d4672
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/navigation/courier/barcode/Barcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,16 @@ function BarcodePage({ t, httpClient, navigation, _route, taskLists }) {
}
}

async function checkClientAction({ action, ...params }) {
function checkClientAction({ action, ...params }) {
if (!entity) return;

switch (action) {
case 'ask_to_unassign':
return await askToUnassign();
return askToUnassign();
case 'ask_to_assign':
return await askToAssign();
return askToAssign();
case 'ask_to_complete':
return await new Promise((resolve, _reject) => {
return new Promise((resolve, _reject) => {
navigateToTask(
navigation,
null,
Expand All @@ -159,7 +159,7 @@ function BarcodePage({ t, httpClient, navigation, _route, taskLists }) {
resolve();
});
case 'warn_multiple_packages':
return await params.fn();
return params.fn();
default:
return;
}
Expand Down

0 comments on commit f0d4672

Please sign in to comment.