Forráskód Böngészése

fix error with no map

Ben Phelps 2 éve
szülő
commit
cf41e988eb
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/utils/proxies/generic.js

+ 1 - 1
src/utils/proxies/generic.js

@@ -24,7 +24,7 @@ export default async function genericProxyHandler(req, res, maps) {
       });
 
       let resultData = data;
-      if (maps[endpoint]) {
+      if (maps?.[endpoint]) {
         resultData = maps[endpoint](data);
       }