Skip to content

Commit

Permalink
fix TypeError in GoCardless bnp-be-gebabebb sync (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
vojeroen authored Jun 16, 2024
1 parent 62c6a87 commit 44ddf21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app-gocardless/banks/bnp-be-gebabebb.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export default {
let value = (match[4] || match[5]).trim();
if (key === 'narrative') {
// Set narrativeName to the first element in the "narrative" array.
creditorNameFromNarrative = value
.matchAll(/'([a-zA-Z0-9\s]*)'/g)
?.next()
.value[1].trim();
let first_value = value.matchAll(/'(.+?)'/g)?.next().value;
creditorNameFromNarrative = first_value
? first_value[1].trim()
: undefined;
}
// Remove square brackets and single quotes and commas
value = value.replace(/[[\]',]/g, '');
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/370.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [vojeroen]
---

Fix failing GoCardless syncs with a bnp-be-gebabebb account.

0 comments on commit 44ddf21

Please sign in to comment.