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 { SettingsCapa, SettingsGet } from 'Common/Globals';
|
||||||
import { staticLink } from 'Common/Links';
|
//import { staticLink } from 'Common/Links';
|
||||||
|
|
||||||
//import { showScreenPopup } from 'Knoin/Knoin';
|
//import { showScreenPopup } from 'Knoin/Knoin';
|
||||||
|
|
||||||
|
|
@ -22,7 +22,8 @@ export const
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
if (SettingsCapa('OpenPGP') && window.crypto && crypto.getRandomValues) {
|
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())
|
.then(() => this.loadKeyrings())
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.loadKeyrings();
|
this.loadKeyrings();
|
||||||
|
|
|
||||||
7
vendors/openpgp-5/dist/openpgp.js
vendored
7
vendors/openpgp-5/dist/openpgp.js
vendored
|
|
@ -1455,16 +1455,15 @@ var openpgp = (function (exports) {
|
||||||
async function getBigInteger() {
|
async function getBigInteger() {
|
||||||
if (util.detectBigInt()) {
|
if (util.detectBigInt()) {
|
||||||
return BigInteger$1;
|
return BigInteger$1;
|
||||||
} else {
|
}
|
||||||
const { default: BigInteger } = await Promise.resolve().then(function () { return bn_interface; });
|
const { default: BigInteger } = await Promise.resolve().then(function () { return bn_interface; });
|
||||||
return BigInteger;
|
return BigInteger;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// GPG4Browsers - An OpenPGP implementation in javascript
|
// GPG4Browsers - An OpenPGP implementation in javascript
|
||||||
|
|
||||||
const util = {
|
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),
|
isArray: data => Array.isArray(data),
|
||||||
|
|
||||||
|
|
@ -28260,7 +28259,7 @@ var openpgp = (function (exports) {
|
||||||
async function generate(options, config) {
|
async function generate(options, config) {
|
||||||
options.sign = true; // primary key is always a signing key
|
options.sign = true; // primary key is always a signing key
|
||||||
options = sanitizeKeyOptions(options);
|
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)];
|
let promises = [generateSecretKey(options, config)];
|
||||||
promises = promises.concat(options.subkeys.map(options => generateSecretSubkey(options, config)));
|
promises = promises.concat(options.subkeys.map(options => generateSecretSubkey(options, config)));
|
||||||
const packets = await Promise.all(promises);
|
const packets = await Promise.all(promises);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue