Skip to content

Commit

Permalink
fix: combining patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Jun 21, 2021
1 parent f61c930 commit b138b3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/slimy-pigs-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"rdf-web-access-control": patch
---

Pattern function would not have been called
2 changes: 1 addition & 1 deletion packages/rdf-web-access-control/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function agentClass(agent: GraphPointer | undefined) {

function combinePatterns(patterns: Required<Check>['additionalPatterns'], acl: Variable) {
if (Array.isArray(patterns)) {
return patterns.reduce((prev, next) => sparql`${prev}\n${next}`, sparql``)
return patterns.reduce((prev, next) => sparql`${prev}\n${next(acl)}`, sparql``)
}

return patterns(acl)
Expand Down

0 comments on commit b138b3c

Please sign in to comment.