From a9f05776381ebe9131d1d02b06d58327ed79d5df Mon Sep 17 00:00:00 2001 From: zoubin Date: Wed, 30 Sep 2015 15:14:39 +0800 Subject: [PATCH] fix relative_url --- lib/plugins/helper/relative_url.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/helper/relative_url.js b/lib/plugins/helper/relative_url.js index 8f85847dd8..f02ca5725c 100644 --- a/lib/plugins/helper/relative_url.js +++ b/lib/plugins/helper/relative_url.js @@ -22,7 +22,7 @@ function relativeUrlHelper(from, to) { var outLength = out.length; // If the last 2 elements of `out` is empty strings, replace them with `index.html`. - if (outLength > 1 && !out[outLength - 1] && !out[outLength] - 2) { + if (outLength > 1 && !out[outLength - 1] && !out[outLength - 2]) { out = out.slice(0, outLength - 2).concat('index.html'); }