Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
fix: json true
Browse files Browse the repository at this point in the history
  • Loading branch information
JamilOmar committed Nov 26, 2019
1 parent e630310 commit 63d4790
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/check-self-update/fetch-module-registry-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ export function fetchModuleRegistryInfo(name: string) {
const url = [REGISTRY_URL, name, 'latest'].join('/');

return new Promise((resolve, reject) => {
request({ url, method: 'GET'}, (error, response, body) => {
request({ url, method: 'GET' , json:true}, (error, response, body) => {
if (error) {
reject(error);
return;
}
if (body)
resolve(JSON.parse(body));
else
resolve();
resolve(body);
});
});
}

0 comments on commit 63d4790

Please sign in to comment.