diff options
author | 2020-03-06 16:21:37 +0100 | |
---|---|---|
committer | 2020-03-06 16:21:37 +0100 | |
commit | 0bffe11b762832dc68d869f0961d0087a8f01ac5 (patch) | |
tree | 86a9f373204e4b58d81378d1b6807aab5c21a70a | |
parent | Fix uncaught error on injectCSS that does not exist (diff) | |
download | ferdium-app-0bffe11b762832dc68d869f0961d0087a8f01ac5.tar.gz ferdium-app-0bffe11b762832dc68d869f0961d0087a8f01ac5.tar.zst ferdium-app-0bffe11b762832dc68d869f0961d0087a8f01ac5.zip |
Use async methods of fs-extra
-rw-r--r-- | src/webview/lib/RecipeWebview.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js index 68e68e042..1d24326c5 100644 --- a/src/webview/lib/RecipeWebview.js +++ b/src/webview/lib/RecipeWebview.js | |||
@@ -67,9 +67,9 @@ class RecipeWebview { | |||
67 | * be an absolute path to the file | 67 | * be an absolute path to the file |
68 | */ | 68 | */ |
69 | injectCSS(...files) { | 69 | injectCSS(...files) { |
70 | files.forEach((file) => { | 70 | files.forEach(async (file) => { |
71 | if (fs.existsSync(file)) { | 71 | if (await fs.exists(file)) { |
72 | const data = fs.readFileSync(file); | 72 | const data = await fs.readFile(file); |
73 | const styles = document.createElement('style'); | 73 | const styles = document.createElement('style'); |
74 | styles.innerHTML = data.toString(); | 74 | styles.innerHTML = data.toString(); |
75 | 75 | ||