File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/app-frontend/src/features/timeline/composable Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export async function takeScreenshot (event: TimelineEvent) {
31
31
id : screenshot . id
32
32
} )
33
33
screenshots . value . push ( screenshot )
34
- } else if ( typeof chrome !== 'undefined' && chrome . tabs ) {
34
+ } else if ( typeof chrome !== 'undefined' && chrome . tabs && typeof chrome . tabs . captureVisibleTab === 'function' ) {
35
35
chrome . tabs . captureVisibleTab ( {
36
36
format : 'png'
37
37
} , dataUrl => {
@@ -51,7 +51,7 @@ export async function takeScreenshot (event: TimelineEvent) {
51
51
}
52
52
}
53
53
54
- export const supportsScreenshot = typeof browser !== 'undefined' || ( typeof chrome !== 'undefined' && ! ! chrome . tabs )
54
+ export const supportsScreenshot = typeof browser !== 'undefined' || ( typeof chrome !== 'undefined' && ! ! chrome . tabs && typeof chrome . tabs . captureVisibleTab === 'function' )
55
55
56
56
if ( typeof browser !== 'undefined' ) {
57
57
browser . runtime . onMessage . addListener ( req => {
You can’t perform that action at this time.
0 commit comments