From 006d914c1dd6cd0ea6b0fa140a8afcf59cd9b8f6 Mon Sep 17 00:00:00 2001 From: Junghyun Colin Kim Date: Tue, 30 Nov 2021 01:10:43 +0900 Subject: [PATCH] Use ternary operator --- src/services/models/Operation.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/services/models/Operation.ts b/src/services/models/Operation.ts index fbacc6e4..a0087017 100644 --- a/src/services/models/Operation.ts +++ b/src/services/models/Operation.ts @@ -105,8 +105,7 @@ export class OperationModel implements IMenuItem { this.name = getOperationSummary(operationSpec); - this.sidebarLabel = this.name; - if (options.sideNavStyle === 'path-only') this.sidebarLabel = this.path; + this.sidebarLabel = options.sideNavStyle === 'path-only' ? this.path : this.name; if (this.isCallback) { // NOTE: Callbacks by default should not inherit the specification's global `security` definition.