Skip to content

Conversation

@matthewlipski
Copy link
Collaborator

No description provided.

@vercel
Copy link

vercel bot commented Sep 26, 2024

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

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Sep 26, 2024 9:25am
blocknote-website ✅ Ready (Inspect) Visit Preview Sep 26, 2024 9:25am

container = defaultGetContainer(element);
}
if (!container) {
return "none";
Copy link
Collaborator

Choose a reason for hiding this comment

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

can this happen or should it be an error?

) {
let container = getContainer?.();
if (!container) {
container = defaultGetContainer(element);
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not just say getContainer = defaultGetContainer in the function signature?

!container.classList.contains("bn-suggestion-menu") &&
!container.classList.contains("bn-grid-suggestion-menu")
) {
return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's make explicit with return undefined (instead of empty return statement)

const defaultGetContainer = (element: HTMLElement) => {
let container: HTMLElement = element;

while (
Copy link
Collaborator

Choose a reason for hiding this comment

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

@YousefED YousefED mentioned this pull request May 16, 2025
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.

3 participants