Now logout also close the shared browser
							parent
							
								
									f9fa27f5b8
								
							
						
					
					
						commit
						d2b9c98c8d
					
				| 
						 | 
					@ -296,7 +296,7 @@ module.exports.getUserData = async function () {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * @public
 | 
					 * @public
 | 
				
			||||||
 * Logout from the current user.
 | 
					 * Logout from the current user and gracefully close shared browser.
 | 
				
			||||||
 * You **must** be logged in to the portal before calling this method.
 | 
					 * You **must** be logged in to the portal before calling this method.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
module.exports.logout = function () {
 | 
					module.exports.logout = function () {
 | 
				
			||||||
| 
						 | 
					@ -305,6 +305,12 @@ module.exports.logout = function () {
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  shared.isLogged = false;
 | 
					  shared.isLogged = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Gracefully close shared browser
 | 
				
			||||||
 | 
					  if (!shared.isolation) {
 | 
				
			||||||
 | 
					    _browser.close()
 | 
				
			||||||
 | 
					    .then(() => _browser = null);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
//#endregion
 | 
					//#endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,7 +11,7 @@ class UserData {
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        this.username = "";
 | 
					        this.username = "";
 | 
				
			||||||
        /**
 | 
					        /**
 | 
				
			||||||
         * Path to the user 's profile picture.
 | 
					         * Path to the user's profile picture.
 | 
				
			||||||
         * @type URL
 | 
					         * @type URL
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        this.avatarSrc = null;
 | 
					        this.avatarSrc = null;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue