Browse Source

fix: only access nested json values when corrent payload type (#3352)

efficient_tiling
Nik 6 years ago
parent
commit
7e1d97665a
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      react/features/subtitles/middleware.js

+ 6
- 0
react/features/subtitles/middleware.js View File

@@ -65,6 +65,12 @@ MiddlewareRegistry.register(store => next => action => {
65 65
  * @returns {Object} The value returned by {@code next(action)}.
66 66
  */
67 67
 function _endpointMessageReceived({ dispatch, getState }, next, action) {
68
+    if (!(action.json
69
+        && (action.json.type === JSON_TYPE_TRANSCRIPTION_RESULT
70
+            || action.json.type === JSON_TYPE_TRANSLATION_RESULT))) {
71
+        return next(action);
72
+    }
73
+
68 74
     const json = action.json;
69 75
     const translationLanguage
70 76
         = getState()['features/base/conference'].conference

Loading…
Cancel
Save