Skip to content

Commit

Permalink
fix(stega): remove try/catch block from stegaClean (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored May 3, 2024
1 parent b573f14 commit 06aaad2
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/browserslist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6
with:
author: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
body: I ran `npx update-browserslist-db@latest` 🧑‍💻
branch: actions/update-browserslist-database-if-needed
commit-message: 'chore: update browserslist db'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/bun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6
with:
author: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
body: I ran `bun install` 🧑‍💻
branch: actions/maintain-bun-lock
commit-message: 'chore(bun): update bun lockfile'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6
with:
author: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
body: I ran `npm run test:deno:update_import_map` 🧑‍💻
branch: actions/maintain-import-map
commit-message: 'chore(deno): update import_map.json'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6
with:
author: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
body: I ran `npx prettier --ignore-path .gitignore --cache --write .` 🧑‍💻
branch: actions/prettier
commit-message: 'chore(prettier): 🤖 ✨'
Expand Down
6 changes: 1 addition & 5 deletions src/stega/stegaClean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ import {vercelStegaClean} from '@vercel/stega'
* @public
*/
export function stegaClean<Result = unknown>(result: Result): Result {
try {
return vercelStegaClean<Result>(result)
} catch {
return result
}
return vercelStegaClean<Result>(result)
}

/**
Expand Down
1 change: 0 additions & 1 deletion test/stega/stegaClean.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ test('it handles strings', () => {
test('it handles values that are not supported by JSON', () => {
expect(stegaClean(undefined)).toMatchInlineSnapshot(`undefined`)
expect(stegaClean(null)).toMatchInlineSnapshot(`null`)
expect(stegaClean(Symbol('foo'))).toMatchInlineSnapshot(`Symbol(foo)`)
expect(stegaClean(new Set([1, 2, 3]))).toMatchInlineSnapshot(`{}`)
expect(
stegaClean(
Expand Down

0 comments on commit 06aaad2

Please sign in to comment.