Close browser page after get version from title

pull/38/head
samuele.berlusconi 2020-10-22 13:50:58 +02:00
parent 04d1b864c3
commit 70cfa36b4f
1 changed files with 1 additions and 0 deletions

View File

@ -100,6 +100,7 @@ module.exports.getGameVersionFromTitle = async function (browser, info) {
const endIndex = title.indexOf("]", startIndex);
let version = title.substring(startIndex, endIndex).trim().toUpperCase();
if (version.startsWith("V")) version = version.replace("V", ""); // Replace only the first occurrence
await page.close();
return version;
};