Skip to content

Blank page after copying empty values in Format Prompt Values #5133

@lcanavesio

Description

@lcanavesio

Describe the bug

When opening the Format Prompt Values dialog and leaving the input field empty, clicking on Copy to clipboard throws a console error, leaves the page completely blank, and any unsaved flow is lost.

To Reproduce

Go to the Format Prompt Values section.
Leave the first field (input) empty ("").
Click the Copy to clipboard icon.
The page turns blank and the following error appears in the console:

index-C6GKaUTA.js:62 TypeError: Cannot read properties of undefined (reading 'writeText') at V (CredentialListDialog-BNh2u_Ji.js:6:1433) at enableClipboard (CredentialListDialog-BNh2u_Ji.js:6:2124) at t.<anonymous> (main-zDAGC98s.js:13:18279)

Expected behavior

It should either:
Copy an empty string ("") to the clipboard, or
Gracefully handle the undefined value without throwing an error or refreshing the page.

Screenshots

No response

Flow

No response

Use Method

Docker

Flowise Version

3.0.5

Operating System

Linux

Browser

Chrome

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions