Fix wrong check for IDs validation
							parent
							
								
									5fa50505e4
								
							
						
					
					
						commit
						712bd6a8d6
					
				| 
						 | 
				
			
			@ -151,7 +151,7 @@ export default class PlatformUser implements ILazy {
 | 
			
		|||
    if (!shared.isLogged) throw new UserNotLogged(USER_NOT_LOGGED);
 | 
			
		||||
 | 
			
		||||
    // Check ID
 | 
			
		||||
    if (!this.id && this.id < 1) throw new InvalidID(INVALID_USER_ID);
 | 
			
		||||
    if (!this.id || this.id < 1) throw new InvalidID(INVALID_USER_ID);
 | 
			
		||||
 | 
			
		||||
    // Prepare the URL
 | 
			
		||||
    const url = new URL(this.id.toString(), `${urls.MEMBERS}/`).toString();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -102,7 +102,7 @@ export default class Post implements ILazy {
 | 
			
		|||
    if (!shared.isLogged) throw new UserNotLogged(USER_NOT_LOGGED);
 | 
			
		||||
 | 
			
		||||
    // Check ID
 | 
			
		||||
    if (!this.id && this.id < 1) throw new InvalidID(INVALID_POST_ID);
 | 
			
		||||
    if (!this.id || this.id < 1) throw new InvalidID(INVALID_POST_ID);
 | 
			
		||||
 | 
			
		||||
    // Fetch HTML page containing the post
 | 
			
		||||
    const url = new URL(this.id.toString(), urls.POSTS).toString();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -237,7 +237,7 @@ export default class Thread implements ILazy {
 | 
			
		|||
    if (!shared.isLogged) throw new UserNotLogged(USER_NOT_LOGGED);
 | 
			
		||||
 | 
			
		||||
    // Check ID
 | 
			
		||||
    if (!this.id && this.id < 1) throw new InvalidID(INVALID_THREAD_ID);
 | 
			
		||||
    if (!this.id || this.id < 1) throw new InvalidID(INVALID_THREAD_ID);
 | 
			
		||||
 | 
			
		||||
    // Prepare the url
 | 
			
		||||
    this._url = new URL(this.id.toString(), urls.THREADS).toString();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue