Skip to content

Commit

Permalink
Avoid errors when running in browser
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktor-k committed Nov 26, 2019
1 parent c8eeb08 commit 99093a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ async function parseKey(buffer: Buffer) {
}

async function verifyIdentifies() {
if (typeof process === 'undefined') {
return;
}
const good = '\x1b[32;1m✓\x1b[0m';
const bad = '\x1b[31;1m✗\x1b[0m';
const key = await readStdinToBuffer();
Expand Down
3 changes: 3 additions & 0 deletions scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ System.register("index", ["openpgp", "verifier"], function (exports_2, context_2
return { fingerprint, proofs };
}
async function verifyIdentifies() {
if (typeof process === 'undefined') {
return;
}
const good = '\x1b[32;1m✓\x1b[0m';
const bad = '\x1b[31;1m✗\x1b[0m';
const key = await readStdinToBuffer();
Expand Down

0 comments on commit 99093a5

Please sign in to comment.