mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
added if block for check response type
This commit is contained in:
@@ -91,19 +91,21 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
GetChatHistory().then((response) => {
|
GetChatHistory().then((response) => {
|
||||||
response.forEach((element) => {
|
if (response && response.length) {
|
||||||
let imageUrl = "https://avatar.spworlds.ru/face/55/" + element.userName;
|
response.forEach((element) => {
|
||||||
|
let imageUrl = "https://avatar.spworlds.ru/face/55/" + element.userName;
|
||||||
|
|
||||||
const MsgUser = {
|
const MsgUser = {
|
||||||
id: this.id + 1,
|
id: this.id + 1,
|
||||||
msg: element.message,
|
msg: element.message,
|
||||||
username: element.userName,
|
username: element.userName,
|
||||||
icon: imageUrl,
|
icon: imageUrl,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.array.push(MsgUser);
|
this.array.push(MsgUser);
|
||||||
});
|
});
|
||||||
this.ScrollToBottom();
|
this.ScrollToBottom();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user