Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Commit

Permalink
fix getting parent from cache. closes gh-378
Browse files Browse the repository at this point in the history
  • Loading branch information
paularmstrong committed Jan 2, 2014
1 parent 9532f53 commit 6f1ee56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/swig.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ exports.Swig = function (opts) {

parentFile = parentFile || options.filename;
parentFile = path.resolve(path.dirname(parentFile), parentName);
parent = self.parseFile(parentFile, utils.extend({}, options, { filename: parentFile }));
parent = cacheGet(parentFile) || self.parseFile(parentFile, utils.extend({}, options, { filename: parentFile }));
parentName = parent.parent;

if (parentFiles.indexOf(parentFile) !== -1) {
Expand Down

0 comments on commit 6f1ee56

Please sign in to comment.