diff options
Diffstat (limited to 'src/webview/lib')
-rw-r--r-- | src/webview/lib/RecipeWebview.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js index b5793a5f1..b8fe7dc52 100644 --- a/src/webview/lib/RecipeWebview.js +++ b/src/webview/lib/RecipeWebview.js | |||
@@ -1,5 +1,5 @@ | |||
1 | const { ipcRenderer } = require('electron'); | 1 | import { ipcRenderer } from 'electron'; |
2 | const fs = require('fs-extra'); | 2 | import { pathExistsSync, readFile } from 'fs-extra'; |
3 | 3 | ||
4 | const debug = require('debug')('Ferdi:Plugin:RecipeWebview'); | 4 | const debug = require('debug')('Ferdi:Plugin:RecipeWebview'); |
5 | 5 | ||
@@ -73,8 +73,8 @@ class RecipeWebview { | |||
73 | */ | 73 | */ |
74 | injectCSS(...files) { | 74 | injectCSS(...files) { |
75 | files.forEach(async (file) => { | 75 | files.forEach(async (file) => { |
76 | if (fs.pathExistsSync(file)) { | 76 | if (pathExistsSync(file)) { |
77 | const data = await fs.readFile(file, 'utf8'); | 77 | const data = await readFile(file, 'utf8'); |
78 | const styles = document.createElement('style'); | 78 | const styles = document.createElement('style'); |
79 | styles.innerHTML = data; | 79 | styles.innerHTML = data; |
80 | 80 | ||
@@ -107,4 +107,4 @@ class RecipeWebview { | |||
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
110 | module.exports = RecipeWebview; | 110 | export default RecipeWebview; |