瀏覽代碼

Fix to add validation when using getInput

Dave Solares 5 年之前
父節點
當前提交
b4a4122385
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/DeviceInput/InputDevices/deviceSourceManager.ts

+ 1 - 1
src/DeviceInput/InputDevices/deviceSourceManager.ts

@@ -108,7 +108,7 @@ export class DeviceSourceManager implements IDisposable {
      * @param deviceSlot "Slot" or index that device is referenced in
      * @returns DeviceSource object
      */
-    public getDeviceSource<T extends DeviceType>(deviceType: DeviceType, deviceSlot?: number): Nullable<DeviceSource<T>> {
+    public getDeviceSource<T extends DeviceType>(deviceType: T, deviceSlot?: number): Nullable<DeviceSource<T>> {
         if (deviceSlot === undefined) {
             if (this._firstDevice[deviceType] === undefined) {
                 return null;