Skip to content

Commit a7d3fbe

Browse files
committed
✨ (settings) improve settings loading
1 parent 7afca2e commit a7d3fbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/settings/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default <Module>function settingsModule() {
2121
// Get Docus config path
2222
let settingsPath = resolve(options.srcDir, 'docus.config')
2323
if (existsSync(settingsPath + '.js')) settingsPath += '.js'
24-
if (existsSync(settingsPath + '.ts')) settingsPath += '.ts'
24+
else if (existsSync(settingsPath + '.ts')) settingsPath += '.ts'
2525

2626
// Get theme settings path
2727
if (!options.themeDir) {
@@ -31,7 +31,7 @@ export default <Module>function settingsModule() {
3131
}
3232
let themeDefaultsPath = resolve(options.themeDir, 'settings')
3333
if (existsSync(themeDefaultsPath + '.js')) themeDefaultsPath += '.js'
34-
if (existsSync(themeDefaultsPath + '.ts')) themeDefaultsPath += '.ts'
34+
else if (existsSync(themeDefaultsPath + '.ts')) themeDefaultsPath += '.ts'
3535

3636
// Delete Node cache for settings files
3737
clearModule(themeDefaultsPath)

0 commit comments

Comments
 (0)