Skip to content

Commit ead5c85

Browse files
authored
chore: use nullish coalescing instead of the ternary operator (#4759)
Required by a new ESLint rule. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
1 parent e7739d8 commit ead5c85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/jsii-calc/lib/calculator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ export class Calculator extends composition.CompositeOperation {
301301

302302
props = props ?? {};
303303

304-
const initialValue = props.initialValue ? props.initialValue : 0;
304+
const initialValue = props.initialValue ?? 0;
305305
this.curr = new Number(initialValue);
306306
this.maxValue = props.maximumValue;
307307
}

0 commit comments

Comments
 (0)