From 813a34dc6be0f364fceaa2400823e0d4bab98b8d Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Mon, 6 Nov 2023 09:52:17 +0100 Subject: infra(unicorn): prefer-negative-index (#2512) --- scripts/apidoc/signature.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') 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]; -- cgit v1.2.3