Skip to content

Commit 060150b

Browse files
committed
chore: underscript.items
1 parent 3159e03 commit 060150b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/structures/constants/item.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as api from 'src/utils/4.api.js';
12
import Constant from './constant.js';
23

34
export default class Item extends Constant {
@@ -21,10 +22,13 @@ export default class Item extends Constant {
2122
static EMOTE = new Item('Emote', 'emote', 'reward-emote');
2223
static PROFILE = new Item('Profile Skin', 'Profile', 'profile skin', 'profile', 'reward-profile-skin');
2324

24-
static find(name) {
25+
static find(value) {
26+
if (value instanceof Item) return value;
2527
// eslint-disable-next-line no-use-before-define
26-
return items.find((item) => item.equals(name));
28+
return items.find((item) => item.equals(value));
2729
}
2830
}
2931

3032
const items = Object.values(Item);
33+
34+
api.mod.items = Object.fromEntries(Object.entries(Item));

0 commit comments

Comments
 (0)