Skip to content

Commit

Permalink
[items] Minor code clean-up
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 committed Dec 25, 2023
1 parent 6fb5c99 commit 71746a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions items/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,7 @@ function replaceItem (itemConfig) {
*/
function getItem (name, nullIfMissing = false) {
try {
if (typeof name === 'string' || name instanceof String) {
return new Item(itemRegistry.getItem(name));
}
return new Item(itemRegistry.getItem(name));
} catch (e) {
if (nullIfMissing) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion types/items/items.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 71746a8

Please sign in to comment.