Skip to content

Commit 801a01b

Browse files
author
Marco Crespi
committed
fix(win): Fix missing global object
1 parent 9941aa3 commit 801a01b

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

lib/bindings/win/bindings.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types="node" />
22
import EventEmitter from 'events';
33
declare global {
4-
const Windows: any;
4+
let Windows: any;
55
}
66
export interface Radio extends EventEmitter {
77
kind: string;

lib/bindings/win/bindings.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/bindings/win/bindings.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/bindings/win/bindings.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bindings/win/bindings.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AddressType } from '../../models';
66
import * as rt from './rt-utils';
77

88
declare global {
9-
const Windows: any;
9+
let Windows: any;
1010
}
1111

1212
try {
@@ -20,6 +20,7 @@ try {
2020
rt.using(require('../../../build/Release/win-dev.radios.node'), 'Windows.Devices.Radios');
2121
} catch {
2222
// NO-OP
23+
(global as any).Windows = null;
2324
}
2425

2526
const BluetoothLEDevice = Windows?.Devices.Bluetooth.BluetoothLEDevice;

0 commit comments

Comments
 (0)