Skip to content

Commit a0bae0b

Browse files
committed
Allow registered link-header actions not to return anything
1 parent 3d73ebd commit a0bae0b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/middleware/packages/ldp/services/link-header/actions/get.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ module.exports = {
1212
for (const actionName of this.registeredActionNames) {
1313
const params = await ctx.call(actionName, { uri });
1414

15-
if (!params.uri) throw new Error(`An uri should be returned from the ${actionName} action`);
15+
if (params) {
16+
if (!params.uri) throw new Error(`An uri should be returned from the ${actionName} action`);
1617

17-
linkHeader.set(params);
18+
linkHeader.set(params);
19+
}
1820
}
1921

2022
// Get container-specific headers (if any)

0 commit comments

Comments
 (0)