Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #2374 (comment)
Looks like this is one of those cases where we need to make sure we await for a promise and return its result rather than just return the promise to be awaited on elsewhere.
Probably why the original code was like:
kuma-gui/src/app/common/code-block/ResourceCodeBlock.vue
Lines 101 to 107 in 6c158ba
But we've lost that detail through lack some good comments and subsequent upgrades/refactors there. I'll probably either refactor this code slightly to make this clearer or add some clearer comments. Putting the PR up whilst I think about that a little.
As little sidenote: I really wanted to progress the dev time clipboard coping debug I added here #1981 into something we could also use for testing clipboard interactions.
Unfortunately we removed the clipboard debugging here #2374, but this PR shows why it would be good to get that back in and then also progressed into something we can use for e2e tests.
Closes #2513