Explorar el Código

fix error with no map

Ben Phelps hace 2 años
padre
commit
cf41e988eb
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);
       }