Skip to content

Commit

Permalink
Reverse the split path array a second time to put it back in the corr…
Browse files Browse the repository at this point in the history
…ect order (so multi-level directory structures are processed correctly).
  • Loading branch information
jkrehm committed Apr 25, 2013
1 parent a35795c commit a6c5700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion duster.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function compile_dust(path, curr, prev) {

var split_path = path.split("/");
var filename = split_path.reverse()[0].replace(".dust", "");
var destpath_parts = split_path.slice(input_parts, split_path.length - 1);
var destpath_parts = split_path.reverse().slice(input_parts, split_path.length - 1);
var destpath = destpath_parts.join("/");
if (destpath.length > 0) destpath = destpath + "/";

Expand Down

0 comments on commit a6c5700

Please sign in to comment.