Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible error in helper relative_url.js #1416

Closed
ghost23 opened this issue Jul 28, 2015 · 1 comment
Closed

Possible error in helper relative_url.js #1416

ghost23 opened this issue Jul 28, 2015 · 1 comment

Comments

@ghost23
Copy link

ghost23 commented Jul 28, 2015

Hi,

i was having an issue with the generation of relative links in my paginations. I think, this line:

https://github.com/hexojs/hexo/blob/master/lib/plugins/helper/relative_url.js#L23

is wrong, it says:

if (outLength > 1 && !out[outLength - 1] && !out[outLength] - 2){

I think it should be (at the end, outLength -2):

if (outLength > 1 && !out[outLength - 1] && !out[outLength - 2]){

If I change that, my pagination works correctly.

@cgmartin
Copy link

cgmartin commented Jan 3, 2016

Looks like this is fixed in master but hasn't been published for a release version yet (current 3.1.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants