Skip to content

Commit

Permalink
Merge pull request #55 from decaf-dev/dev
Browse files Browse the repository at this point in the history
1.4.1
  • Loading branch information
decaf-dev authored Jun 4, 2024
2 parents 57c1930 + a3449ee commit dcb5787
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "vault-explorer",
"name": "Vault Explorer",
"version": "1.4.0",
"version": "1.4.1",
"minAppVersion": "1.4.13",
"description": "Explore your vault in visual format",
"author": "DecafDev",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-vault-explorer",
"version": "1.4.0",
"version": "1.4.1",
"description": "Explore your vault in visual format",
"main": "main.js",
"scripts": {
Expand Down
12 changes: 7 additions & 5 deletions src/svelte/app/services/filters/property-groups-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const filterByProperty = (frontmatter: FrontMatterCache | undefined, filter: Pro
Logger.warn(`Property value is not an array: ${propertyValue}`);
return true;
}
const compare = value.split(",").map((v) => v.trim());
const compare = value.split(",").map((v) => v.trim()).filter((v) => v !== "");
const doesMatch = doesListMatchFilter(propertyValue, compare, condition, matchWhenPropertyDNE);
return doesMatch;
} else if (type === "number") {
Expand Down Expand Up @@ -146,15 +146,17 @@ const doesListMatchFilter = (
switch (condition) {
case ListFilterCondition.CONTAINS:
if (propertyValue === null) return matchIfNull;
if (compare.length === 0) return true;

return propertyValue.some((value) => //Union
compare.some((c) => c === value)
return compare.every((c) =>
propertyValue.some((value) => value.contains(c))
);
case ListFilterCondition.DOES_NOT_CONTAIN:
if (propertyValue === null) return matchIfNull;
if (compare.length === 0) return true;

return propertyValue.every((value) => //Complement
compare.every((c) => c !== value)
return compare.every((c) =>
propertyValue.every((value) => !value.contains(c))
);
case ListFilterCondition.EXISTS:
return propertyValue !== null;
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@
"1.2.0": "1.4.13",
"1.2.1": "1.4.13",
"1.3.0": "1.4.13",
"1.4.0": "1.4.13"
"1.4.0": "1.4.13",
"1.4.1": "1.4.13"
}

0 comments on commit dcb5787

Please sign in to comment.