fixed 'TypeError: Promise.resolve is not a constructor' in Firefox

pull/749/head
Marco 11 years ago
parent 810aabf2a6
commit 14ebef70cb

@ -87,7 +87,7 @@ window.textsecure.crypto = new function() {
priv[0] |= 0x0001; priv[0] |= 0x0001;
//TODO: fscking type conversion //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});
} }
} }

@ -73,7 +73,7 @@ window.crypto.subtle = (function() {
function promise(implementation) { function promise(implementation) {
var args = Array.prototype.slice.call(arguments); var args = Array.prototype.slice.call(arguments);
args.shift(); args.shift();
return new Promise.resolve(toArrayBuffer(implementation.apply(this, args))); return Promise.resolve(toArrayBuffer(implementation.apply(this, args)));
} }
// public interface functions // public interface functions

Loading…
Cancel
Save