Skip to content

Fix can paste properties with invalid json#61

Closed
766974616c79 wants to merge 1 commit intoFacepunch:masterfrom
766974616c79:fix-paste-invalid-json
Closed

Fix can paste properties with invalid json#61
766974616c79 wants to merge 1 commit intoFacepunch:masterfrom
766974616c79:fix-paste-invalid-json

Conversation

@766974616c79
Copy link
Copy Markdown
Contributor

If you copy invalid JSON and right-click on a property that requires JSON, then the menu no longer appears and an error is displayed.
My PR wraps the JSON parsing in a try-catch block because the parsing method returns an error if the JSON is invalid. If there is an error, I return false.

Resolves #573

@garrynewman garrynewman added the triaged triaged pull-requests are replicated on the internal sbox repo label Nov 29, 2025
@handsomematt handsomematt added triaged triaged pull-requests are replicated on the internal sbox repo and removed triaged triaged pull-requests are replicated on the internal sbox repo labels Nov 30, 2025
@sboxbot sboxbot added the accepted this pull request was accepted, hurrah! label Nov 30, 2025
@sboxbot
Copy link
Copy Markdown
Contributor

sboxbot commented Nov 30, 2025

This PR has been merged upstream.

@sboxbot sboxbot closed this Nov 30, 2025
@766974616c79 766974616c79 deleted the fix-paste-invalid-json branch November 30, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted this pull request was accepted, hurrah! triaged triaged pull-requests are replicated on the internal sbox repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClipboardTools crashes when you have something copied that is not supported

4 participants