aboutsummaryrefslogtreecommitdiffstats
path: root/src/webview/recipe.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview/recipe.js')
-rw-r--r--src/webview/recipe.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/webview/recipe.js b/src/webview/recipe.js
index 0b44d1d01..7c069562f 100644
--- a/src/webview/recipe.js
+++ b/src/webview/recipe.js
@@ -16,6 +16,7 @@ import {
16 disable as disableDarkMode, 16 disable as disableDarkMode,
17} from 'darkreader'; 17} from 'darkreader';
18 18
19import { existsSync } from 'fs';
19import ignoreList from './darkmode/ignore'; 20import ignoreList from './darkmode/ignore';
20import customDarkModeCss from './darkmode/custom'; 21import customDarkModeCss from './darkmode/custom';
21 22
@@ -209,9 +210,11 @@ class RecipeController {
209 notificationsHandler, 210 notificationsHandler,
210 sessionHandler, 211 sessionHandler,
211 ); 212 );
212 // eslint-disable-next-line import/no-dynamic-require 213 if (existsSync(modulePath)) {
213 require(modulePath)(this.recipe, { ...config, recipe }); 214 // eslint-disable-next-line import/no-dynamic-require
214 debug('Initialize Recipe', config, recipe); 215 require(modulePath)(this.recipe, { ...config, recipe });
216 debug('Initialize Recipe', config, recipe);
217 }
215 218
216 this.settings.service = Object.assign(config, { recipe }); 219 this.settings.service = Object.assign(config, { recipe });
217 220