diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-08-05 16:03:32 +0200 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-08-05 16:03:32 +0200 |
| commit | d3e2a13c17ce69dc37f7fe58e1d0fc6854e8ff45 (patch) | |
| tree | 17d812b001b49cea0f75519b65615e8bdb0d2ae5 /addons/web_linkedin/static | |
| parent | b55ca0fad10a68916e52f5d4ffaee969018173b6 (diff) | |
Corrected small bug
bzr revid: nicolas.vanhoren@openerp.com-20120805140332-mfldrt9zx38b68ww
Diffstat (limited to 'addons/web_linkedin/static')
| -rw-r--r-- | addons/web_linkedin/static/src/js/linkedin.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web_linkedin/static/src/js/linkedin.js b/addons/web_linkedin/static/src/js/linkedin.js index b1e91b05810..013ad888cb9 100644 --- a/addons/web_linkedin/static/src/js/linkedin.js +++ b/addons/web_linkedin/static/src/js/linkedin.js @@ -118,14 +118,14 @@ openerp.web_linkedin = function(instance) { pdef.resolve(result); }); return $.when(cdef, pdef).then(function(companies, people) { - var lst = companies.companies.values; - var plst = people.people.values; + var lst = companies.companies.values || []; + var plst = people.people.values || []; lst = _.initial(lst, _.min([self.limit / 2, plst.length])); _.map(lst, function(el) { el.__type = "company"; return el; }); - plst = _.first(people.people.values, self.limit - lst.length) + plst = _.first(plst, self.limit - lst.length) _.map(plst, function(el) { el.__type = "people"; return el; |
