mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 10:33:02 -05:00
🐛 Fix iphone 13 unable to use regex lookbehinds (#3823)
* fix iphone 13 unable to use regex lookbehinds * release notes
This commit is contained in:
@@ -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(/(?<!#)(#[\w\d\p{Emoji}-]+)(?=\s|$)/gu)
|
||||
.filter(tag => 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 => {
|
||||
|
||||
6
upcoming-release-notes/3823.md
Normal file
6
upcoming-release-notes/3823.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [MikesGlitch]
|
||||
---
|
||||
|
||||
Fix Iphone 13 error when attempting to view budget.
|
||||
Reference in New Issue
Block a user