Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: fix docs roll for functions without args (#29684)

Max Schmitt03902d8e8505
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));