Explorar o código

resolve promise before retuning page data

Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
31d87220b6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      node-puppeteer/single-file-puppeteer.js

+ 1 - 1
node-puppeteer/single-file-puppeteer.js

@@ -90,7 +90,7 @@ exports.getPageData = async options => {
 			const singleFile = new SingleFile(options);
 			await singleFile.initialize();
 			await singleFile.run();
-			return singleFile.getPageData();
+			return await singleFile.getPageData();
 		}, options);
 	} finally {
 		if (browser) {