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}`);
if (!bundle.modpath)
{
this.logger.error(`Mod: ${key} lacks a modPath property, skipped loading`);
return;
}
this.httpFileUtil.sendFile(resp, `${bundle.modpath}/bundles/${bundle.filename}`);
}