diff --git a/classes/API.js b/classes/API.js index 5ff26fa..a0f0da6 100644 --- a/classes/API.js +++ b/classes/API.js @@ -241,7 +241,10 @@ export default class linkedInAPIClass { const r = await this._makeReq(urlExt); // there's nothing left, returns what we have - if (!r?.included?.length) return empAll; + if (!r?.included?.length) { + if (!castToClass) return empAll; + else return empAll.map(o => new LinkedInProfile(o, this)); + } // profiles with no info can be useless const filtered = r.included.filter(e => { diff --git a/package.json b/package.json index 8e4980f..97ac742 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ }, "type": "module", "name": "linkedin-api-js", - "version": "1.0.0-10", + "version": "1.0.0-11", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1"