1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-07 16:06:15 +00:00

verify is phoneNumber exists before fetching

This commit is contained in:
Loic Blot 2014-10-06 15:21:45 +02:00
parent 6394f7394d
commit 03b6c70562

View File

@ -152,8 +152,12 @@ function changeSelectedConversation(item) {
OC.Util.History.pushState('phonenumber=' + phoneNumber);
// Reset it for refreshConversation
lastMsgDate = 0;
fetchConversation(phoneNumber);
changeSelectedConversation($(this));
// phoneNumber must exist
if (phoneNumber != null) {
fetchConversation(phoneNumber);
changeSelectedConversation($(this));
}
event.preventDefault();
});