Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
9d52d843e2
commit
9f13d4b97c
1 changed files with 7 additions and 8 deletions
|
|
@ -451,18 +451,17 @@ export default {
|
|||
|
||||
// Bailout info for analytics. We use combined string to send to analytics - BailoutCode_BailoutString - ex: 15_ApiError
|
||||
const bailoutCode = store.bailoutCode;
|
||||
let bailoutString = "";
|
||||
let bailoutCombinedString = "";
|
||||
|
||||
try
|
||||
{
|
||||
bailoutString = bailoutCode ? Object.keys(BailoutCode).find(key => BailoutCode[key] === bailoutCode) : "";
|
||||
bailoutCombinedString = bailoutCode ? `${bailoutCode}_${bailoutString}` : "";
|
||||
}
|
||||
catch (error) {
|
||||
try {
|
||||
if (bailoutCode !== null && bailoutCode !== undefined) {
|
||||
const bailoutString =
|
||||
Object.keys(BailoutCode).find((key) => BailoutCode[key] === bailoutCode) ?? "";
|
||||
bailoutCombinedString = bailoutString ? `${bailoutCode}_${bailoutString}` : `${bailoutCode}`;
|
||||
}
|
||||
} catch (error) {
|
||||
// Do not let error here stop logging.
|
||||
}
|
||||
|
||||
// Use parentaccount on order, use parentaccount on issconfig as fallback.
|
||||
const parentAccountNumber = (order.parentAccountNumber ?? issConfig.parentAccountNumber).toString();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue