Skip to content

The agent that grows with you

fmt(js): `npm run fix` on merge (#92034)

hermes-seaeye[bot]fc7523ca31ee
diff --git a/apps/desktop/src/lib/selection-copy-colors.test.ts b/apps/desktop/src/lib/selection-copy-colors.test.ts
index a7ceab5e2e6..4faca83f91a 100644
--- a/apps/desktop/src/lib/selection-copy-colors.test.ts
+++ b/apps/desktop/src/lib/selection-copy-colors.test.ts
@@ -167,6 +167,7 @@ describe('serializeSelectionStructure', () => {
const host = armSelection(
'<p style="color: rgb(230, 237, 243); font-family: -apple-system, sans-serif">plain prose</p>'
)
+
const html = serializeSelectionStructure(window.getSelection()!, document)
// Generic family on the wrapper: resolves to each platform's own face,
diff --git a/apps/desktop/src/lib/selection-copy-colors.ts b/apps/desktop/src/lib/selection-copy-colors.ts
index 944c4073eda..13a303b9d25 100644
--- a/apps/desktop/src/lib/selection-copy-colors.ts
+++ b/apps/desktop/src/lib/selection-copy-colors.ts
@@ -174,6 +174,7 @@ export function selectionInkLuma(sel: Selection, doc: Document): number | null {
for (let i = 0; i < sel.rangeCount && lumas.length < MAX_PROBE_NODES; i++) {
const range = sel.getRangeAt(i)
const root = range.commonAncestorContainer
+
const walker = doc.createTreeWalker(
root.nodeType === 1 ? root : (root.parentElement ?? doc.body),
NodeFilter.SHOW_TEXT