aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/apidoc/signature.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/apidoc/signature.ts b/scripts/apidoc/signature.ts
index 2cca92b9..43026a78 100644
--- a/scripts/apidoc/signature.ts
+++ b/scripts/apidoc/signature.ts
@@ -342,7 +342,7 @@ function extractDefaultFromComment(comment?: Comment): string | undefined {
throw new Error(`Found description text after the default value:\n${text}`);
}
- summary.splice(summary.length - 2, 2);
+ summary.splice(-2, 2);
const lastSummaryPart = summary[summary.length - 1];
lastSummaryPart.text = lastSummaryPart.text.replace(/[ \n]Defaults to $/, '');
return result[2];