From e552d302ac2f184fcb3123aa24b20b461e50304d Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 15:51:44 +0000 Subject: [PATCH] cherry-pick(#29684): chore: fix docs roll for functions without args --- utils/doclint/documentation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/doclint/documentation.js b/utils/doclint/documentation.js index de35df27ba..a50423996a 100644 --- a/utils/doclint/documentation.js +++ b/utils/doclint/documentation.js @@ -737,7 +737,8 @@ function parseTypeExpression(type) { if (type[i] === '(') { name = type.substring(0, i); const matching = matchingBracket(type.substring(i), '(', ')'); - args = parseTypeExpression(type.substring(i + 1, i + matching - 1)); + const argsString = type.substring(i + 1, i + matching - 1); + args = argsString ? parseTypeExpression(argsString) : null; i = i + matching; if (type[i] === ':') { retType = parseTypeExpression(type.substring(i + 1));