Ver código fonte

resolve promise before retuning page data

Gildas 7 anos atrás
pai
commit
31d87220b6
1 arquivos alterados com 1 adições e 1 exclusões
  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) {