mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
If first addressbook was empty it was seen as if there where no contacts at all.
This commit is contained in:
parent
a1239a37aa
commit
a484ee817c
1 changed files with 4 additions and 1 deletions
|
|
@ -316,8 +316,11 @@ OC.Contacts={
|
|||
console.log('Card, cid: ' + params.cid + ' aid: ' + params.aid);
|
||||
var newid, bookid, firstitem;
|
||||
if(!parseInt(params.cid) && !parseInt(params.aid)) {
|
||||
firstitem = $('#contacts ul').first().find('li:first-child');
|
||||
firstitem = $('#contacts ul').find('li:first-child');
|
||||
if(firstitem.length > 0) {
|
||||
if(firstitem.length > 1) {
|
||||
firstitem = firstitem.first();
|
||||
}
|
||||
newid = parseInt(firstitem.data('id'));
|
||||
bookid = parseInt(firstitem.data('bookid'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue