mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-25 23:37:36 +00:00
onResult shows strange behaviour with !result || !result.value
This commit is contained in:
parent
31c362be0a
commit
de93505edc
@ -186,16 +186,14 @@ onMounted(() => {
|
|||||||
|
|
||||||
onResult(() => {
|
onResult(() => {
|
||||||
console.log('TransactionLink.onResult... result=', result)
|
console.log('TransactionLink.onResult... result=', result)
|
||||||
if (!result || !result.value) {
|
if (result?.value?.__typename === 'TransactionLink') {
|
||||||
console.log('TransactionLink.onResult... no result:', result)
|
|
||||||
} else if (result.value.__typename === 'TransactionLink') {
|
|
||||||
console.log('TransactionLink.onResult... redeeming')
|
console.log('TransactionLink.onResult... redeeming')
|
||||||
setTransactionLinkInformation()
|
setTransactionLinkInformation()
|
||||||
} else if (result.value.__typename === 'DisbursementLink') {
|
} else if (result?.value?.__typename === 'DisbursementLink') {
|
||||||
console.log('TransactionLink.onResult... disbursing')
|
console.log('TransactionLink.onResult... disbursing')
|
||||||
setDisbursementLinkInformation()
|
setDisbursementLinkInformation()
|
||||||
} else {
|
} else {
|
||||||
console.log('TransactionLink.onResult... unknown type:', result.value.__typename)
|
console.log('TransactionLink.onResult... unknown type:', result)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -216,10 +214,12 @@ function setTransactionLinkInformation() {
|
|||||||
console.log('TransactionLink.setTransactionLinkInformation... linkData.value=', linkData.value)
|
console.log('TransactionLink.setTransactionLinkInformation... linkData.value=', linkData.value)
|
||||||
if (linkData.value.__typename === 'ContributionLink' && store.state.token) {
|
if (linkData.value.__typename === 'ContributionLink' && store.state.token) {
|
||||||
console.log('TransactionLink.setTransactionLinkInformation... typename === ContributionLink')
|
console.log('TransactionLink.setTransactionLinkInformation... typename === ContributionLink')
|
||||||
|
// explicit no await
|
||||||
mutationLink(linkData.value.amount)
|
mutationLink(linkData.value.amount)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDisbursementLinkInformation() {
|
function setDisbursementLinkInformation() {
|
||||||
console.log('TransactionLink.setDisbursementLinkInformation... result=', result)
|
console.log('TransactionLink.setDisbursementLinkInformation... result=', result)
|
||||||
const { queryDisbursementLink } = result.value
|
const { queryDisbursementLink } = result.value
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user