From 21b96024b1739e3f3cc6c08abdad35d9db92b808 Mon Sep 17 00:00:00 2001 From: Tom Stanley <36701898+Taelkir@users.noreply.github.com> Date: Thu, 21 Feb 2019 15:10:13 +0000 Subject: [PATCH] change loop to start at 0 instead of 1 https://github.com/hollandben/grunt-cache-bust/issues/243 This change fixed this ^ issue for me and started altering .html files in subfolders. --- tasks/cachebust.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/cachebust.js b/tasks/cachebust.js index ff75d31..8c35e0c 100644 --- a/tasks/cachebust.js +++ b/tasks/cachebust.js @@ -122,7 +122,7 @@ module.exports = function(grunt) { ]; // find relative paths for shared dirs var originalDirParts = path.dirname(original).split('/'); - for (var i = 1; i <= fileDepth; i++) { + for (var i = 0; i <= fileDepth; i++) { var fileDir = originalDirParts.slice(0, i).join('/'); var baseDir = baseDirs.slice(0, i).join('/'); if (fileDir === baseDir) {