Skip to content

fix: ternary operator with lenght causing 0#10090

Merged
PeerRich merged 1 commit intomainfrom
10082-dangling-zero-in-the-dashboard
Jul 12, 2023
Merged

fix: ternary operator with lenght causing 0#10090
PeerRich merged 1 commit intomainfrom
10082-dangling-zero-in-the-dashboard

Conversation

@PeerRich
Copy link
Copy Markdown
Member

PSA: dont use length with && to prevent trailing 0's

@PeerRich PeerRich linked an issue Jul 12, 2023 that may be closed by this pull request
@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 0:12am
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 0:12am
cal-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 0:12am
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 0:12am

@PeerRich PeerRich changed the title fixed ternary operator with lenght fix: ternary operator with lenght causing 0 Jul 12, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 12, 2023

Thank you for following the naming conventions! 🙏

@github-actions github-actions Bot added Medium priority Created by Linear-GitHub Sync ui area: UI, frontend, button, form, input 🐛 bug Something isn't working labels Jul 12, 2023
@zomars zomars added the core area: core, team members only label Jul 12, 2023
@PeerRich PeerRich requested a review from a team July 12, 2023 12:06
@PeerRich PeerRich enabled auto-merge (squash) July 12, 2023 12:07
@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous Bot commented Jul 12, 2023

🤖 Meticulous spotted visual differences in 67 of 259 screens tested: view and approve differences detected.

Last updated for commit ce6bdee. This comment will update as new commits are pushed.

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@deploysentinel
Copy link
Copy Markdown

deploysentinel Bot commented Jul 12, 2023

Current Playwright Test Results Summary

✅ 88 Passing - ⚠️ 3 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 07/12/2023 12:16:35pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: ce6bdee

Started: 07/12/2023 12:14:20pm UTC

⚠️ Flakes

📄   apps/web/playwright/event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Event Types tests user can add multiple organizer address
Retry 1Initial Attempt
0% (0) 0 / 42 runs
failed over last 7 days
11.90% (5) 5 / 42 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 1Initial Attempt
3.70% (1) 1 / 27 run
failed over last 7 days
96.30% (26) 26 / 27 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
0% (0) 0 / 27 runs
failed over last 7 days
14.81% (4) 4 / 27 runs
flaked over last 7 days

View Detailed Build Results


@PeerRich PeerRich merged commit 6d413f5 into main Jul 12, 2023
@PeerRich PeerRich deleted the 10082-dangling-zero-in-the-dashboard branch July 12, 2023 12:17
@emrysal
Copy link
Copy Markdown
Contributor

emrysal commented Jul 12, 2023

!! works too and is cleaner 👍

@odicho
Copy link
Copy Markdown

odicho commented Jul 13, 2023

I think a cleaner approach here is to actually do a strict comparison to 0, !== 0 or > 0. I try to avoid the ? <> : null syntax whenever possible.

fritterhoff pushed a commit to hm-edu/cal.com that referenced this pull request Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working core area: core, team members only Medium priority Created by Linear-GitHub Sync ui area: UI, frontend, button, form, input

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

Dangling zero in the dashboard

5 participants