Pārlūkot izejas kodu

fix(api): support params with value of undefined

master
Leonard Kim 6 gadus atpakaļ
vecāks
revīzija
57b9954d9c
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 4
    2
      react/features/base/config/parseURLParams.js

+ 4
- 2
react/features/base/config/parseURLParams.js Parādīt failu

@@ -42,9 +42,11 @@ export default function parseURLParams(
42 42
 
43 43
         try {
44 44
             value = param[1];
45
+
45 46
             if (!dontParse) {
46
-                value
47
-                    = JSON.parse(decodeURIComponent(value).replace(/\\&/, '&'));
47
+                const decoded = decodeURIComponent(value).replace(/\\&/, '&');
48
+
49
+                value = decoded === 'undefined' ? undefined : JSON.parse(decoded);
48 50
             }
49 51
         } catch (e) {
50 52
             reportError(

Notiek ielāde…
Atcelt
Saglabāt