Throw exception on bad args to SyncRequest
// FREEBIE
This commit is contained in:
parent
1b68e652cc
commit
d6da77b6f4
2 changed files with 6 additions and 0 deletions
|
@ -37718,6 +37718,9 @@ textsecure.MessageSender.prototype = {
|
|||
window.textsecure = window.textsecure || {};
|
||||
|
||||
function SyncRequest(sender, receiver) {
|
||||
if (!(sender instanceof MessageSender) || !(receiver instanceof MessageReceiver)) {
|
||||
throw new Error('Tried to construct a SyncRequest without MessageSender and MessageReceiver');
|
||||
}
|
||||
this.receiver = receiver;
|
||||
|
||||
this.oncontact = this.onContactSyncComplete.bind(this);
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
window.textsecure = window.textsecure || {};
|
||||
|
||||
function SyncRequest(sender, receiver) {
|
||||
if (!(sender instanceof MessageSender) || !(receiver instanceof MessageReceiver)) {
|
||||
throw new Error('Tried to construct a SyncRequest without MessageSender and MessageReceiver');
|
||||
}
|
||||
this.receiver = receiver;
|
||||
|
||||
this.oncontact = this.onContactSyncComplete.bind(this);
|
||||
|
|
Loading…
Reference in a new issue