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

chore: Anvil only: Automatically delete redundant zones #34879

Merged
merged 6 commits into from
Jul 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add comment for isRedundantZoneWidget
  • Loading branch information
znamenskii-ilia committed Jul 11, 2024
commit a9f47e9e46947988b61c7113193bb2e0129300aa
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,6 @@ export const isRedundantZoneWidget = (
): boolean =>
isZoneWidget(widget) &&
isEmptyWidget(widget) &&
// Check that the zone is the only child of the parent section.
widgetChildren(parentSection).length === 1 &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

What are we checking by this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That the zone is the only child in the parent. I will add a comment

!hasWidgetJsPropertiesEnabled(widget);
Loading