fix error with no map

This commit is contained in:
Ben Phelps 2022-09-17 08:38:53 +03:00
parent d7a161c088
commit cf41e988eb

View file

@ -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);
}