Fix undefind in group-pictures

This commit is contained in:
Mimi 2024-04-16 17:20:51 +08:00
parent ca0e6f0a0e
commit 2195b01d8c

View File

@ -120,9 +120,10 @@ const templates = {
}; };
module.exports = ctx => function(args, content) { module.exports = ctx => function(args, content) {
args = args[0].split('-'); let group, layout;
const group = parseInt(args[0], 10); if (args[0]) {
const layout = parseInt(args[1], 10); [group, layout] = args[0].split('-');
}
content = ctx.render.renderSync({ text: content, engine: 'markdown' }); content = ctx.render.renderSync({ text: content, engine: 'markdown' });