mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed the following code smells:
1) useState call is not destructured into value + setter pair. 2) A fragment with only one child is redundant. 3) Unnecessary '.apply()' and '.call()'. 4) Expected the Promise rejection reason to be an Error.
This commit is contained in:
@@ -43,7 +43,7 @@ function fetch_ticket_lifetime () {
|
||||
if (ticket_lifetime > 0) {
|
||||
return Promise.resolve(ticket_lifetime);
|
||||
} else {
|
||||
return Promise.reject();
|
||||
return Promise.reject(new Error(null));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user