We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent caa7e31 commit 66afb26Copy full SHA for 66afb26
lib/resolve_theme.js
@@ -11,12 +11,12 @@ var path = require('path'),
11
* @returns {string} directory
12
*/
13
function resolveTheme(theme) {
14
- if (!theme) {
15
- return path.dirname(resolve.sync('documentation-theme-default', { basedir: __dirname }));
16
- }
+ var basedir = theme ? process.cwd() : __dirname;
+
+ theme = theme || 'documentation-theme-default';
17
18
try {
19
- return path.dirname(resolve.sync(theme, { basedir: process.cwd() }));
+ return path.dirname(resolve.sync(theme, { basedir: basedir }));
20
} catch (e) {
21
throw new Error('Theme ' + theme + ' not found');
22
}
0 commit comments