remove unnecessary re-initialization of CookieJar.cookies

This commit is contained in:
jkhsjdhjs 2019-08-15 22:53:02 +02:00
parent 946c711e90
commit e5bf5729d1
Signed by: jkhsjdhjs
GPG Key ID: BAC6ADBAB7D576CC

View File

@ -13,8 +13,6 @@ export default class CookieJar {
throw new TypeError("Second parameter is not a string!");
if(this.file && fs.existsSync(this.file))
this.addFromFile(this.file);
else
this.cookies = new Map();
if(Array.isArray(cookies)) {
if(!cookies.every(c => c instanceof Cookie))
throw new TypeError("Third parameter is not an array of cookies!");