From ead9300d8eac1af85aae91c07f9d4d74412f0974 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 22 Jan 2015 15:09:12 +0100 Subject: [PATCH] Correctly remove first email input When joining a room which has email notifications configured --- public/js/vroom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/vroom.js b/public/js/vroom.js index 6f0a307..74f3aa6 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -504,7 +504,7 @@ function initVroom(room) { addEmailInputField(obj.email); }); // Now, remove the first one if the list is not empty - if (data.notif.length > 0){ + if (Object.keys(data.notif).length > 0){ $('.email-list').find('.email-entry:first').remove(); } }