mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Resolve #303 isString() error
This commit is contained in:
parent
049350b112
commit
99ffb986f1
2 changed files with 31 additions and 31 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { SettingsCapa, SettingsGet } from 'Common/Globals';
|
||||
import { staticLink } from 'Common/Links';
|
||||
//import { staticLink } from 'Common/Links';
|
||||
|
||||
//import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
|
|
@ -22,7 +22,8 @@ export const
|
|||
|
||||
init() {
|
||||
if (SettingsCapa('OpenPGP') && window.crypto && crypto.getRandomValues) {
|
||||
rl.loadScript(staticLink('js/min/openpgp.min.js'))
|
||||
rl.loadScript(SettingsGet('StaticLibsJs').replace('/libs.', '/openpgp.'))
|
||||
// rl.loadScript(staticLink('js/min/openpgp.min.js'))
|
||||
.then(() => this.loadKeyrings())
|
||||
.catch(e => {
|
||||
this.loadKeyrings();
|
||||
|
|
|
|||
9
vendors/openpgp-5/dist/openpgp.js
vendored
9
vendors/openpgp-5/dist/openpgp.js
vendored
|
|
@ -1455,16 +1455,15 @@ var openpgp = (function (exports) {
|
|||
async function getBigInteger() {
|
||||
if (util.detectBigInt()) {
|
||||
return BigInteger$1;
|
||||
} else {
|
||||
const { default: BigInteger } = await Promise.resolve().then(function () { return bn_interface; });
|
||||
return BigInteger;
|
||||
}
|
||||
const { default: BigInteger } = await Promise.resolve().then(function () { return bn_interface; });
|
||||
return BigInteger;
|
||||
}
|
||||
|
||||
// GPG4Browsers - An OpenPGP implementation in javascript
|
||||
|
||||
const util = {
|
||||
isString: data => typeof data === 'string' || Object.prototype.isPrototypeOf.call(data, String),
|
||||
isString: data => null != data && (typeof data === 'string' || Object.prototype.isPrototypeOf.call(data, String)),
|
||||
|
||||
isArray: data => Array.isArray(data),
|
||||
|
||||
|
|
@ -28260,7 +28259,7 @@ var openpgp = (function (exports) {
|
|||
async function generate(options, config) {
|
||||
options.sign = true; // primary key is always a signing key
|
||||
options = sanitizeKeyOptions(options);
|
||||
options.subkeys = options.subkeys.map((subkey, index) => sanitizeKeyOptions(options.subkeys[index], options));
|
||||
options.subkeys = options.subkeys.map((subkey, index) => sanitizeKeyOptions(subkey, options));
|
||||
let promises = [generateSecretKey(options, config)];
|
||||
promises = promises.concat(options.subkeys.map(options => generateSecretSubkey(options, config)));
|
||||
const packets = await Promise.all(promises);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue