fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
Showing only changes of commit 2c28eff318 - Show all commits

View file

@ -102,10 +102,12 @@ async function createBrowser(profilePath): Promise<any> {
args.push(`--user-data-dir=${profilePath}`);
const preferences = urljoin(profilePath, "Default", "Preferences");
const file = Fs.readFileSync(preferences, "utf8")
const data = JSON.parse(file)
data["profile"]['exit_type'] = "none";
Fs.writeFileSync(preferences, JSON.stringify(data))
if (Fs.existsSync(preferences)) {
const file = Fs.readFileSync(preferences, "utf8")
const data = JSON.parse(file)
data["profile"]['exit_type'] = "none";
Fs.writeFileSync(preferences, JSON.stringify(data))
}
}
const browser = await puppeteer.launch({