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

refactor: remove unnecessary if condition for linear element onKeyDown #5486

Merged
merged 2 commits into from Jul 26, 2022

Conversation

ad1992
Copy link
Member

@ad1992 ad1992 commented Jul 26, 2022

No description provided.

@vercel
Copy link

vercel bot commented Jul 26, 2022

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

Name Status Preview Updated
docs ❌ Failed (Inspect) Jul 26, 2022 at 10:31AM (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Jul 26, 2022 at 10:31AM (UTC)
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Jul 26, 2022 at 10:31AM (UTC)

@dwelle
Copy link
Member

dwelle commented Jul 26, 2022

While correct, can we refactor both branches so it's easier to reason about, like this?

if (selectedElements.length === 1) {
  if (isLinearElement(selectedElements[0])) {
    /* ... */
  } else {
    /* ... */
  }
}

@ad1992
Copy link
Member Author

ad1992 commented Jul 26, 2022

While correct, can we refactor both branches so it's easier to reason about, like this?

if (selectedElements.length === 1) {
  if (isLinearElement(selectedElements[0])) {
    /* ... */
  } else {
    /* ... */
  }
}

sure done 👍🏻

@ad1992 ad1992 merged commit 339212e into master Jul 26, 2022
@ad1992 ad1992 deleted the aakansha-refct branch July 26, 2022 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants