Skip to content

Commit

Permalink
Apply suggestions : recipe.with && recipe.with.length > i
Browse files Browse the repository at this point in the history
Co-authored-by: Niels Pilgaard Grøndahl <[email protected]>
  • Loading branch information
ZZZank and NielsPilgaard authored Nov 30, 2023
1 parent 44ec007 commit 83c9efc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kubejs/client_scripts/item_modifiers/jei_descriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,9 @@ onEvent('jei.information', (event) => {

recipes.forEach((recipe) => {
for (let i = 0; i < recipe.text.length; i++) {
try {
if (recipe.with && recipe.with.length > i) {
recipe.text[i] = Text.translate(recipe.text[i], recipe.with[i]);
} catch (e) {
} else {
recipe.text[i] = Text.translate(recipe.text[i]);
}
}
Expand Down

0 comments on commit 83c9efc

Please sign in to comment.