diff --git a/packages/loot-core/src/server/accounts/transaction-rules.ts b/packages/loot-core/src/server/accounts/transaction-rules.ts index 3f952dcece3..d32eb9324fb 100644 --- a/packages/loot-core/src/server/accounts/transaction-rules.ts +++ b/packages/loot-core/src/server/accounts/transaction-rules.ts @@ -462,9 +462,19 @@ export function conditionsToAQL(conditions, { recurDateBounds = 100 } = {}) { return { $or: values.map(v => apply(field, '$eq', v)) }; case 'hasTags': - const tagValues = value - .split(/(? tag.startsWith('#')); + const words = value.split(/\s+/); + const tagValues = []; + words.forEach(word => { + const startsWithHash = word.startsWith('#'); + const containsMultipleHash = word.slice(1).includes('#'); + const correctlyFormatted = word.match(/#[\w\d\p{Emoji}-]+/gu); + const validHashtag = + startsWithHash && !containsMultipleHash && correctlyFormatted; + + if (validHashtag) { + tagValues.push(word); + } + }); return { $and: tagValues.map(v => { diff --git a/upcoming-release-notes/3823.md b/upcoming-release-notes/3823.md new file mode 100644 index 00000000000..ee79dbc1cbb --- /dev/null +++ b/upcoming-release-notes/3823.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [MikesGlitch] +--- + +Fix Iphone 13 error when attempting to view budget.