From 0bffe11b762832dc68d869f0961d0087a8f01ac5 Mon Sep 17 00:00:00 2001 From: Amine Mouafik Date: Fri, 6 Mar 2020 16:21:37 +0100 Subject: Use async methods of fs-extra --- src/webview/lib/RecipeWebview.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/webview/lib') 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 { * be an absolute path to the file */ injectCSS(...files) { - files.forEach((file) => { - if (fs.existsSync(file)) { - const data = fs.readFileSync(file); + files.forEach(async (file) => { + if (await fs.exists(file)) { + const data = await fs.readFile(file); const styles = document.createElement('style'); styles.innerHTML = data.toString(); -- cgit v1.2.3-70-g09d2