From 4495ba267ad29dd836d440baaf3fc6908d4eb5a8 Mon Sep 17 00:00:00 2001 From: lisonge Date: Mon, 1 Jul 2024 21:34:14 +0800 Subject: [PATCH] fix: canCopy --- src/utils/selector.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/selector.ts b/src/utils/selector.ts index d7fc40f..c244538 100644 --- a/src/utils/selector.ts +++ b/src/utils/selector.ts @@ -138,6 +138,7 @@ export const parseSelector = (source: string): Selector => { }); } } + const selector: Selector = { tracks: ms.tracks, trackIndex: ms.trackIndex, @@ -146,7 +147,9 @@ export const parseSelector = (source: string): Selector => { qfIdValue: ms.qfIdValue, qfVidValue: ms.qfVidValue, qfTextValue: ms.qfTextValue, - canCopy: true, // TODO check copy + canCopy: !ms.binaryExpressions.some((b) => + b.properties.some((p) => p.startsWith('_')), + ), toString: () => ms.toString(), match: (node) => { return ms.match(node, transform) ?? undefined;