mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
safely access pin reset response
This commit is contained in:
parent
2ca6277660
commit
70cae0d2c3
@ -77,6 +77,13 @@ define([
|
||||
return;
|
||||
}
|
||||
rpc.send('RESET', channels, function (e, response) {
|
||||
if (e) {
|
||||
return void cb(e);
|
||||
}
|
||||
if (!response.length) {
|
||||
console.log(response);
|
||||
return void cb('INVALID_RESPONSE');
|
||||
}
|
||||
cb(e, response[0]);
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user