mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-06 01:25:28 +00:00
use shallow copy to set recepientUser after login/registration
This commit is contained in:
parent
d74819a86d
commit
b0a9da74c4
@ -234,19 +234,21 @@ function setDisbursementLinkInformation() {
|
|||||||
)
|
)
|
||||||
if (queryTransactionLink) {
|
if (queryTransactionLink) {
|
||||||
// recipientUser is only set if the user is logged in
|
// recipientUser is only set if the user is logged in
|
||||||
|
// Make a shallow copy to break reactivity/read-only
|
||||||
|
const linkCopy = { ...queryTransactionLink }
|
||||||
|
// Now you can safely set recipientUser
|
||||||
if (store.state.gradidoID !== null) {
|
if (store.state.gradidoID !== null) {
|
||||||
console.log('TransactionLink.setDisbursementLinkInformation... setting recipientUser')
|
linkCopy.recipientUser = {
|
||||||
queryTransactionLink.recipientUser = {
|
|
||||||
gradidoID: store.state.gradidoID,
|
gradidoID: store.state.gradidoID,
|
||||||
firstName: store.state.firstName,
|
firstName: store.state.firstName,
|
||||||
alias: store.state.alias,
|
alias: store.state.alias,
|
||||||
}
|
}
|
||||||
console.log(
|
|
||||||
'TransactionLink.setDisbursementLinkInformation... recipientUser=',
|
|
||||||
queryTransactionLink.recipientUser,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
linkData.value = queryTransactionLink
|
console.log(
|
||||||
|
'TransactionLink.setDisbursementLinkInformation... recipientUser=',
|
||||||
|
queryTransactionLink.recipientUser,
|
||||||
|
)
|
||||||
|
linkData.value = linkCopy
|
||||||
console.log('TransactionLink.setDisbursementLinkInformation... linkData.value=', linkData.value)
|
console.log('TransactionLink.setDisbursementLinkInformation... linkData.value=', linkData.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user