From 8a836ab4f638e3a5dbb17ed226157f25716533b7 Mon Sep 17 00:00:00 2001 From: William Bryk Date: Thu, 7 Dec 2017 13:40:41 -0500 Subject: [PATCH] Fixed order of chats in chatHistory --- views/profile.handlebars | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/profile.handlebars b/views/profile.handlebars index 592816d..63fc354 100644 --- a/views/profile.handlebars +++ b/views/profile.handlebars @@ -214,7 +214,8 @@ contentType: 'application/json; charset=utf-8', url: '/profile/chats', success: res => { - console.log(res) + // put array in correct order with most recent at index 0 + res.reverse(); // Double-check conversation count if (res.length > $("#convo-count").text) {