Throw exception on bad args to SyncRequest
// FREEBIE
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user