mirror of https://github.com/vector-im/riot-web
Add missing returns
parent
88a0d34c2b
commit
d34ba57adb
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue