Skip to content

Commit 581936f

Browse files
authored
fix: make Expense.quote resolver resilient against broken quotes (#11567)
1 parent 5510300 commit 581936f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/graphql/v2/object/Expense.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ export const GraphQLExpense = new GraphQLObjectType<ExpenseModel, Express.Reques
684684
throw new Unauthorized("You don't have permission to pay this expense");
685685
}
686686
const quote = isScheduledForPayment ? expense.data?.quote : await ExpenseLib.quoteExpense(expense);
687-
if (!quote) {
687+
if (!quote?.paymentOption) {
688688
return null;
689689
}
690690

0 commit comments

Comments
 (0)