Close browser page after get version from title
parent
04d1b864c3
commit
70cfa36b4f
|
@ -100,6 +100,7 @@ module.exports.getGameVersionFromTitle = async function (browser, info) {
|
||||||
const endIndex = title.indexOf("]", startIndex);
|
const endIndex = title.indexOf("]", startIndex);
|
||||||
let version = title.substring(startIndex, endIndex).trim().toUpperCase();
|
let version = title.substring(startIndex, endIndex).trim().toUpperCase();
|
||||||
if (version.startsWith("V")) version = version.replace("V", ""); // Replace only the first occurrence
|
if (version.startsWith("V")) version = version.replace("V", ""); // Replace only the first occurrence
|
||||||
|
await page.close();
|
||||||
return version;
|
return version;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue