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

Fix processing of DOM nodes during the production build (minified names) #6419

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

featherbear
Copy link
Contributor

@featherbear featherbear commented Aug 30, 2023

changelog(Fixes): Fixed issue #5808 where XPath queries were not working properly

Closes #5808

On the Electron release build, nodes created by xmldom have minified class/object/constructor names, causing the queryXPath to return empty. This PR changes the iteration method to inspect the node's nodeType, rather than its constructor name

@featherbear
Copy link
Contributor Author

featherbear commented Aug 30, 2023

image I did a bit of digging, seems to be because of the library minification of `xmldom`

#5808 (comment)

@jackkav
Copy link
Contributor

jackkav commented Aug 30, 2023

Thanks for your PR @featherbear taking a look now
I have a suspicion this regression was caused by npm resolution issue from apiconnect-wsdl using xmldom 0.1.27, plist using @xmldom/xmldom 0.8.8 and insomnia app using xmldom 0.6.0
This should now be much simpler to stabilise as we only have a single package lock nowadays, a year ago there were at least 3 that could have caused this issue to manifest without warning.

@jackkav jackkav merged commit 350fc47 into Kong:develop Aug 30, 2023
7 checks passed
@filfreire
Copy link
Member

@featherbear you can claim a free tshirt for this PR contribution - find more at https://konghq.com/community/open-source-contribution

jackkav added a commit to jackkav/insomnia that referenced this pull request Nov 24, 2023
…es) (Kong#6419)

* Fix processing of DOM nodes during the production build (minified names)

* eliminate most of the typescript casting

---------

Co-authored-by: jackkav <[email protected]>
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.

XPath query does not work at all
3 participants