diff options
| author | adamelmore <[email protected]> | 2026-01-27 06:27:27 -0600 |
|---|---|---|
| committer | adamelmore <[email protected]> | 2026-01-27 06:29:20 -0600 |
| commit | 095328faf439fbdc62506f3653875fbfec5c60ab (patch) | |
| tree | 707036011dcafaa2ad13d05eb52b041ea6f0d951 /packages/app/src/utils/base64.ts | |
| parent | 743e83d9bfc050183be5bfb0f241ebe5faac6b35 (diff) | |
| download | opencode-095328faf439fbdc62506f3653875fbfec5c60ab.tar.gz opencode-095328faf439fbdc62506f3653875fbfec5c60ab.zip | |
fix(app): non-fatal error handling
Diffstat (limited to 'packages/app/src/utils/base64.ts')
| -rw-r--r-- | packages/app/src/utils/base64.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/app/src/utils/base64.ts b/packages/app/src/utils/base64.ts new file mode 100644 index 000000000..c1f9d88c6 --- /dev/null +++ b/packages/app/src/utils/base64.ts @@ -0,0 +1,10 @@ +import { base64Decode } from "@opencode-ai/util/encode" + +export function decode64(value: string | undefined) { + if (value === undefined) return + try { + return base64Decode(value) + } catch { + return + } +} |
