Forgot to return 😐; don't fetch user anyways when getting from cache.

This commit is contained in:
Paul
2021-08-15 09:56:25 +01:00
parent 5ba143763a
commit 2a14728905
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "revolt.js",
"version": "5.0.1-alpha.4",
"version": "5.0.1-alpha.5",
"main": "dist/index.js",
"repository": "https://gitlab.insrt.uk/revolt/revolt.js",
"author": "Paul Makles <insrt.uk>",
+1 -1
View File
@@ -1,7 +1,7 @@
export * from './Client';
export { UserPermission, ChannelPermission, ServerPermission } from './api/permissions';
export const LIBRARY_VERSION = '5.0.1-alpha.4';
export const LIBRARY_VERSION = '5.0.1-alpha.5';
export const defaultConfig = {
apiURL: 'https://api.revolt.chat',
+1 -1
View File
@@ -203,7 +203,7 @@ export default class Users extends Collection<string, User> {
* @returns User
*/
async fetch(id: string, data?: UserI) {
if (this.has(id)) this.$get(id, data);
if (this.has(id)) return this.$get(id, data);
let res = data ?? await this.client.req('GET', `/users/${id}` as '/users/id');
return this.createObj(res);
}