Add missing returns

pull/21833/head
Marcel 2017-08-24 16:42:32 +02:00 committed by GitHub
parent 88a0d34c2b
commit d34ba57adb
1 changed files with 2 additions and 0 deletions

View File

@ -237,6 +237,7 @@ function getLangsJson() {
(err, response, body) => { (err, response, body) => {
if (err || response.status < 200 || response.status >= 300) { if (err || response.status < 200 || response.status >= 300) {
reject({err: err, response: response}); reject({err: err, response: response});
return;
} }
resolve(JSON.parse(body)); resolve(JSON.parse(body));
} }
@ -251,6 +252,7 @@ function getLanguage(langPath) {
(err, response, body) => { (err, response, body) => {
if (err || response.status < 200 || response.status >= 300) { if (err || response.status < 200 || response.status >= 300) {
reject({err: err, response: response}); reject({err: err, response: response});
return;
} }
resolve(JSON.parse(body)); resolve(JSON.parse(body));
} }