Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kit): possible type error reduce of empty array with no initial value #6107

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

splincode
Copy link
Member

@splincode splincode commented Nov 27, 2023

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactoring
  • Build or CI related changes
  • Tests related changes
  • Documentation content changes

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Reduce_of_empty_array_with_no_initial_value

Copy link

lumberjack-bot bot commented Nov 27, 2023

Pull request was closed ✔️

All saved screenshots (for current PR) were deleted 🗑️

Copy link
Contributor

github-actions bot commented Nov 27, 2023

Visit the preview URL for this PR (updated for commit 575b36c):

https://taiga-ui--pr6107-splincode-fix-runtim-l1sk8f3o.web.app

(expires Thu, 30 Nov 2023 10:30:49 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4b5ece1e114386f6a105425ef799091475b249eb

Copy link

bundlemon bot commented Nov 27, 2023

BundleMon

Unchanged files (5)
Status Path Size Limits
demo/browser/main.(hash).js
374.79KB +10%
demo/browser/vendor.(hash).js
198.18KB +10%
demo/browser/runtime.(hash).js
41.11KB +10%
demo/browser/polyfills.(hash).js
11.22KB +10%
demo/browser/styles.(hash).css
1.22KB +10%

Total files change +12B 0%

Groups updated (1)
Status Path Size Limits
demo/browser/*..js
2.28MB (+12B 0%) -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (6ad2770) 71.93% compared to head (575b36c) 71.93%.

Files Patch % Lines
...ulti-select/native-multi-select-group.component.ts 0.00% 1 Missing ⚠️
...ect/native-select/native-select-group.component.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6107   +/-   ##
=======================================
  Coverage   71.93%   71.93%           
=======================================
  Files        1462     1462           
  Lines       15987    15987           
  Branches     2273     2273           
=======================================
  Hits        11501    11501           
  Misses       4115     4115           
  Partials      371      371           
Flag Coverage Δ
addon-charts 71.10% <ø> (ø)
addon-doc 59.43% <ø> (ø)
addon-mobile 60.49% <ø> (ø)
addon-table 60.75% <ø> (ø)
addon-tablebars 90.90% <ø> (ø)
cdk 78.65% <ø> (ø)
core 78.00% <ø> (ø)
kit 70.19% <50.00%> (ø)
summary 71.93% <50.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

projects/kit/components/input-time/input-time.component.ts Outdated Show resolved Hide resolved
@@ -94,6 +94,7 @@ export class TuiBarChartComponent {
private getMax(values: ReadonlyArray<readonly number[]>, collapsed: boolean): number {
return collapsed
? Math.max(
// eslint-disable-next-line no-restricted-syntax
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you add default 0 here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I add []
image

tests are failed
image

@splincode splincode merged commit ee9d470 into main Nov 30, 2023
34 of 35 checks passed
@splincode splincode deleted the splincode/fix/runtime branch November 30, 2023 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants