We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78bc900 commit 3e931dbCopy full SHA for 3e931db
src/pages/content/QuickCapture.tsx
@@ -33,11 +33,15 @@ const clipPage = () => {
33
};
34
35
const setHighlight = (range: Range) => {
36
- if(!highlights.has("copilot-highlight")) {
37
- highlights.set('copilot-highlight', new Highlight())
+ try {
+ if (!highlights.has("copilot-highlight")) {
38
+ highlights.set('copilot-highlight', new Highlight())
39
+ }
40
+ const highlight = highlights.get('copilot-highlight');
41
+ highlight.add(range);
42
+ } catch (error) {
43
+ console.debug("platform not support highlight function")
44
}
- const highlight = highlights.get('copilot-highlight');
- highlight.add(range);
45
46
47
0 commit comments