Skip to content

Commit

Permalink
fix: canCopy
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Jul 1, 2024
1 parent 82a277e commit 4495ba2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export const parseSelector = (source: string): Selector => {
});
}
}

const selector: Selector = {
tracks: ms.tracks,
trackIndex: ms.trackIndex,
Expand All @@ -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;
Expand Down

0 comments on commit 4495ba2

Please sign in to comment.