Skip to content

Commit

Permalink
fix(cc-logs): do not include hidden metadata into clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
pdesoyres-cc committed Apr 11, 2024
1 parent 90f3d9f commit ca7cacb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/cc-logs/cc-logs.js
Expand Up @@ -585,7 +585,10 @@ export class CcLogs extends LitElement {
const lines = this._logsCtrl.getSelectedLogs()
.map((log) => {
const ts = this._dateDisplayer.format(log.date);
const meta = log.metadata?.map((m) => this._getMetadataText(m, this._getMetadataRendering(m))) ?? [];
const meta = log.metadata
?.map((metadata) => ({ metadata, metadataRendering: this._getMetadataRendering(metadata) }))
.filter(({ metadataRendering }) => !metadataRendering.hidden)
.map(({ metadata, metadataRendering }) => this._getMetadataText(metadata, metadataRendering)) ?? [];
const msg = stripAnsi(log.message);
return [ts, ...meta, msg]
.filter((t) => t?.length > 0)
Expand Down

0 comments on commit ca7cacb

Please sign in to comment.