Skip to content

Commit

Permalink
fix: can not read property split of undefined
Browse files Browse the repository at this point in the history
this closes #16
  • Loading branch information
marianzburlea committed Jun 14, 2019
1 parent c3bb043 commit 9761509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/component/chat/chat.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const Chat = () => {
text2List = text2List.slice(0, -1)
} else {
text2List = text2List.map(t => {
const text2 = t.text.split(pni.id)
const text2 = (t.text || '').split(pni.id)
if (t.type !== 'span' || text2.length === 1) return t
else if (text2.length > 1) {
const gigiKent = convertMessageToComponentData(text2, pni)
Expand Down

0 comments on commit 9761509

Please sign in to comment.