From 2c14dff3404cb97a7c3d29e3aab8c08c074f8353 Mon Sep 17 00:00:00 2001 From: Wang Jiaxiang Date: Sat, 19 Oct 2019 16:39:00 +0800 Subject: [PATCH] Fix error parameters is undefined --- src/pdf-parts-gen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pdf-parts-gen.js b/src/pdf-parts-gen.js index 3122890..3ce844f 100644 --- a/src/pdf-parts-gen.js +++ b/src/pdf-parts-gen.js @@ -101,7 +101,7 @@ export function getSecurityDef(spec, localize) { // Parameter Table function getParameterTableDef(parameters, paramType, localize) { // let filteredParams= parameters ? parameters.filter(param => param.in === paramType):[]; - if (parameters.length === 0) { + if (parameters === undefined || parameters.length === 0) { return; } const tableContent = [