makebrainwaves / BrainWaves

An easy-to-use platform for EEG experimentation in the classroom
MIT License
60 stars 26 forks source link

Error thrown when Emotiv is not discovered with a name property #46

Open jdpigeon opened 5 years ago

jdpigeon commented 5 years ago

Add handling for devices that don't return with a name:

    mergeMap(deviceInfo => {
      if (deviceInfo) {
        return of(
          setDeviceType(
            deviceInfo.name.includes('Muse') ? DEVICES.MUSE : DEVICES.EMOTIV
          ),
          setDeviceInfo(deviceInfo),
          setConnectionStatus(CONNECTION_STATUS.CONNECTED)
        );
      }
      return of(setConnectionStatus(CONNECTION_STATUS.DISCONNECTED));
    })
);
teonbrooks commented 4 years ago

@jdpigeon do you know if this issue is still open?