Add ID validation in setID
parent
fd830d41fa
commit
0924cedbb1
|
@ -143,6 +143,9 @@ export default class PlatformUser implements ILazy {
|
|||
//#region Public methods
|
||||
|
||||
public setID(id: number): void {
|
||||
// Check ID
|
||||
if (!id || id < 1) throw new InvalidID(INVALID_USER_ID);
|
||||
|
||||
this._id = id;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue