0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Added nullguard protection to serialize() for bundle loading

This commit is contained in:
Dev 2024-06-17 15:35:49 +01:00
parent d315414136
commit 383ccf09d7

View File

@ -27,6 +27,12 @@ export class BundleSerializer extends Serializer
} }
this.logger.info(`[BUNDLE]: ${req.url}`); this.logger.info(`[BUNDLE]: ${req.url}`);
if (!bundle.modpath)
{
this.logger.error(`Mod: ${key} lacks a modPath property, skipped loading`);
return;
}
this.httpFileUtil.sendFile(resp, `${bundle.modpath}/bundles/${bundle.filename}`); this.httpFileUtil.sendFile(resp, `${bundle.modpath}/bundles/${bundle.filename}`);
} }