Przeglądaj źródła

removed unneeded await

Gildas 7 lat temu
rodzic
commit
6525219812
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      cli/back-ends/webdriver-chrome.js

+ 1 - 1
cli/back-ends/webdriver-chrome.js

@@ -87,7 +87,7 @@ exports.getPageData = async options => {
 			}
 		}
 		await driver.get(options.url);
-		let scripts = (await Promise.all(SCRIPTS.map(scriptPath => fs.readFileSync(require.resolve(scriptPath)).toString()))).join("\n");
+		let scripts = SCRIPTS.map(scriptPath => fs.readFileSync(require.resolve(scriptPath)).toString()).join("\n");
 		scripts += "\nlazyLoader.getScriptContent = " + (function (path) { return (RESOLVED_CONTENTS)[path]; }).toString().replace("RESOLVED_CONTENTS", JSON.stringify(RESOLVED_CONTENTS)) + ";";
 		const mainWindowHandle = driver.getWindowHandle();
 		const windowHandles = await driver.getAllWindowHandles();