fix: api key copy (#46159)

## TL;DR 

a smol fix regarding masked secret API key text being copied when reveal
fails

## ref:

- closes https://github.com/supabase/supabase/issues/46157

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved secret API key copy behavior to handle edge cases where the
reveal operation returns no value, preventing unintended fallback
behavior.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46159?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Vaibhav authored and GitHub committed 2026-05-21 07:09:55 -06:00
1 parent ba77d15d41
commit 013c344645
1 file changed
+1 -1
@@ -76,7 +76,7 @@ export function ApiKeyPill({
return key ?? ''
} catch {
toast.error('Failed to copy secret API key')
return apiKey.api_key
return ''
}
}