diff --git a/src/settings/index.ts b/src/settings/index.ts index 6a5c47ec6..b73a9d052 100644 --- a/src/settings/index.ts +++ b/src/settings/index.ts @@ -21,7 +21,7 @@ export default function settingsModule() { // Get Docus config path let settingsPath = resolve(options.srcDir, 'docus.config') if (existsSync(settingsPath + '.js')) settingsPath += '.js' - if (existsSync(settingsPath + '.ts')) settingsPath += '.ts' + else if (existsSync(settingsPath + '.ts')) settingsPath += '.ts' // Get theme settings path if (!options.themeDir) { @@ -31,7 +31,7 @@ export default function settingsModule() { } let themeDefaultsPath = resolve(options.themeDir, 'settings') if (existsSync(themeDefaultsPath + '.js')) themeDefaultsPath += '.js' - if (existsSync(themeDefaultsPath + '.ts')) themeDefaultsPath += '.ts' + else if (existsSync(themeDefaultsPath + '.ts')) themeDefaultsPath += '.ts' // Delete Node cache for settings files clearModule(themeDefaultsPath)