Closed halmos closed 5 years ago
https://github.com/humanmade/repress/blob/fe825b9edd61a3b19f8ed0f7e8421e295c93da02/src/handler.js#L162-L165
The above code can result in a posts arrays containing elements with index value of -1 if the post.id is not found. I think the if statement should probably be:
-1
if
if ( position === -1 ) { return null; }
Whoops, this looks like a copy-paste error. Can you send a pull request? :)
sure, just did. https://github.com/humanmade/repress/pull/40
Fixed via 1c4c9ec7738bd86d8de36d7f6122d54c54169531 in #40
https://github.com/humanmade/repress/blob/fe825b9edd61a3b19f8ed0f7e8421e295c93da02/src/handler.js#L162-L165
The above code can result in a posts arrays containing elements with index value of
-1
if the post.id is not found. I think theif
statement should probably be: