mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Merge pull request #31 from codedust/master
Fixed 'TypeError: Promise.resolve is not a constructor' in Firefox
This commit is contained in:
@@ -87,9 +87,9 @@ window.textsecure.crypto = new function() {
|
||||
priv[0] |= 0x0001;
|
||||
|
||||
//TODO: fscking type conversion
|
||||
return new Promise.resolve({ pubKey: prependVersion(toArrayBuffer(curve25519(priv))), privKey: privKey});
|
||||
return Promise.resolve({ pubKey: prependVersion(toArrayBuffer(curve25519(priv))), privKey: privKey});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
var privToPub = function(privKey, isIdentity) { return testing_only.privToPub(privKey, isIdentity); }
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ window.crypto.subtle = (function() {
|
||||
function promise(implementation) {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
args.shift();
|
||||
return new Promise.resolve(toArrayBuffer(implementation.apply(this, args)));
|
||||
return Promise.resolve(toArrayBuffer(implementation.apply(this, args)));
|
||||
}
|
||||
|
||||
// public interface functions
|
||||
|
||||
Reference in New Issue
Block a user