Use ternary operator

This commit is contained in:
Junghyun Colin Kim 2021-11-30 01:10:43 +09:00
parent cbd182a74f
commit 006d914c1d

View File

@ -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.