Skip to content

Commit cf295fb

Browse files
committed
Reordered template location logic.
1 parent d60f87b commit cf295fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/doxdox.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ module.exports.parseScripts = function (scripts, config, pkg) {
7676

7777
});
7878

79-
if (fs.existsSync(path.resolve(config.layout))) {
79+
if (exports.templates[config.layout.toLowerCase()]) {
8080

81-
template = require(path.resolve(config.layout));
81+
template = exports.templates[config.layout.toLowerCase()];
8282

83-
} else if (exports.templates[config.layout.toLowerCase()]) {
83+
} else if (fs.existsSync(path.resolve(config.layout))) {
8484

85-
template = exports.templates[config.layout.toLowerCase()];
85+
template = require(path.resolve(config.layout));
8686

8787
}
8888

0 commit comments

Comments
 (0)