From c497c32ec9b9edf6ef355b40c2e975b0ec9bed58 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Sun, 16 May 2021 19:02:22 -0700 Subject: [PATCH] fix(dotnet): follow up, add WaitFor(action) in order --- utils/doclint/generateDotnetApi.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/doclint/generateDotnetApi.js b/utils/doclint/generateDotnetApi.js index 55f480b23d..5a0c7e9a37 100644 --- a/utils/doclint/generateDotnetApi.js +++ b/utils/doclint/generateDotnetApi.js @@ -574,7 +574,8 @@ function renderMethod(member, parent, output, name) { .forEach(parseArg); if (name.includes('WaitFor') && !['WaitForTimeoutAsync', 'WaitForFunctionAsync', 'WaitForLoadStateAsync', 'WaitForURLAsync', 'WaitForSelectorAsync', 'WaitForElementStateAsync'].includes(name)) { - args.push('Func action = default'); + const firstOptional = args.find(a => a.includes('=')); + args.splice(args.indexOf(firstOptional), 0, 'Func action = default'); argTypeMap.set('Func action = default', 'action'); addParamsDoc('action', ['Action to perform while waiting']); }