Fix error handling
This commit is contained in:
parent
4fd9fd3c7f
commit
87b4bfefd8
|
@ -77,7 +77,8 @@ function seedRandom(buffer) {
|
||||||
*/
|
*/
|
||||||
function delegate(method, options) {
|
function delegate(method, options) {
|
||||||
if (typeof openpgp[method] !== 'function') {
|
if (typeof openpgp[method] !== 'function') {
|
||||||
throw new Error('Unknown Worker Event');
|
response({ event:'method-return', err:'Unknown Worker Event' });
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// parse cloned packets
|
// parse cloned packets
|
||||||
options = openpgp.packet.clone.parseClonedPackets(options, method);
|
options = openpgp.packet.clone.parseClonedPackets(options, method);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user