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

Bugfix: error when trying to create empty dir. #998

Merged
merged 2 commits into from
Mar 25, 2025

Conversation

cheewba
Copy link
Contributor

@cheewba cheewba commented Mar 11, 2025

If the conversation path doesn't contain any directory path, save_conversation tries to create an empty directory structure, which raises an error.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Member

@pirate pirate left a comment

Choose a reason for hiding this comment

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

have not tested it personally but both fixes look good to me in theory

if (domElement) nodeData.children.push(domElement);
}
}
// Handle regular elements
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you move this outside of the else if? - now we do the loop twice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there're different loops, the first one is for shadow root children and the next one is for regular children.

Copy link
Member

@pirate pirate Mar 25, 2025

Choose a reason for hiding this comment

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

I believe open shadow roots can have both normal dom node children and shadow root children, you see this pattern on https://trailhead.salesforce.com/content/learn/modules/starting_force_com/starting_intro?trail_id=force_com_admin_beginner for example. I tested this fix and it works, in fact it was necessary for me to get salesforce automation working, and I included it in my branch 73369f9 (#1114)

@pirate pirate merged commit 1cbe93f into browser-use:main Mar 25, 2025
1 check was pending
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.

4 participants