mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-05-10 05:10:27 -04:00
Fix client_chat example extra array iteration. Closes GH-343
This commit is contained in:
parent
d93c0da39d
commit
a807bdd872
1 changed files with 5 additions and 3 deletions
|
@ -171,9 +171,11 @@ function parseChat(chatObj, parentState) {
|
|||
|
||||
chat += color(util.format.apply(this, args), getColorize(parentState));
|
||||
}
|
||||
chatObj.extra.forEach(function(i) {
|
||||
chat += parseChat(chatObj.extra[i], parentState);
|
||||
});
|
||||
if (chatObj.extra) {
|
||||
chatObj.extra.forEach(function(item) {
|
||||
chat += parseChat(item, parentState);
|
||||
});
|
||||
}
|
||||
return chat;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue