Bläddra i källkod

Merge pull request #8152 from PolygonalSun/polygonalsun/minor-fix

Fix to add validation when using getInput
David Catuhe 5 år sedan
förälder
incheckning
cefe8aae89
1 ändrade filer med 1 tillägg och 1 borttagningar
  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;