From 984a76eeb1bc1342dd84198d811e791b80a958f0 Mon Sep 17 00:00:00 2001 From: lilia Date: Sun, 6 Apr 2014 14:13:27 -0700 Subject: [PATCH] Fix crashing send button destinations is dead. all hail group.members. --- js/popup.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/popup.js b/js/popup.js index c0f525a4a3e4..5bffab92b90d 100644 --- a/js/popup.js +++ b/js/popup.js @@ -47,8 +47,9 @@ registerOnLoadFunction(function() { ).appendTo(ul); $('#button' + i).click(function() { var sendDestinations = [conversation[0].sender]; - for (var j = 0; j < conversation[0].destinations.length; j++) - sendDestinations[sendDestinations.length] = conversation[0].destinations[j]; + if (conversation[0].group) { + sendDestinations = conversation[0].group.members; + } var messageProto = new PushMessageContentProtobuf(); messageProto.body = $('#text' + i).val();