Skip to content

Commit

Permalink
Removing an unneeded op within hypermedia()
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Aug 26, 2018
1 parent ceccfde commit a9e0ae9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ function hypermedia (server, req, rep, headers) {
const li = i.toString();

if (li !== collection) {
const uri = li.indexOf("//") > -1 || li.indexOf("/") === 0 ? li : `${collection}/${li}`.replace(/^\/\//, "/");
const uri = li.indexOf("//") >= 0 ? li : `${collection}/${li}`.replace(/^\/\//, "/");

if (server.allowed("GET", uri) === true) {
links.push({uri: uri, rel: "item"});
Expand Down

0 comments on commit a9e0ae9

Please sign in to comment.