Skip to content

Commit d1ac4fa

Browse files
uubulbnaiba
andauthored
fix: never write undefined (#11)
Co-authored-by: naiba <[email protected]>
1 parent eb044d4 commit d1ac4fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/install-commands.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export const InstallCommandsMenu = forwardRef<HTMLButtonElement, ButtonProps>((p
2828
if (!copy) {
2929
try {
3030
setCopy(true);
31-
if (settings)
32-
await navigator.clipboard.writeText(generateCommand(type, settings));
31+
if (config)
32+
await navigator.clipboard.writeText(generateCommand(type, settings) || '');
3333
} catch (e) {
3434
console.error(e);
3535
toast(t("Error"), {

0 commit comments

Comments
 (0)