changed var to const
This commit is contained in:
parent
70fbc7a35e
commit
5bb06caae2
1 changed files with 4 additions and 3 deletions
|
@ -51,13 +51,14 @@ export function registerScreenShareHandler() {
|
||||||
|
|
||||||
if (isWayland) {
|
if (isWayland) {
|
||||||
const video = data[0];
|
const video = data[0];
|
||||||
if (video)
|
if (video) {
|
||||||
var stream = await request.frame
|
const stream = await request.frame
|
||||||
.executeJavaScript(
|
.executeJavaScript(
|
||||||
`Vesktop.Components.ScreenShare.openScreenSharePicker(${JSON.stringify([video])}, true)`
|
`Vesktop.Components.ScreenShare.openScreenSharePicker(${JSON.stringify([video])}, true)`
|
||||||
)
|
)
|
||||||
.catch(() => null);
|
.catch(() => null);
|
||||||
if (stream === null) return callback({});
|
if (stream === null) return callback({});
|
||||||
|
}
|
||||||
|
|
||||||
callback(video ? { video: sources[0] } : {});
|
callback(video ? { video: sources[0] } : {});
|
||||||
return;
|
return;
|
||||||
|
|
Reference in a new issue