Skip to content

fix: querySelector returns null when nothing is found. - #16

Closed
JeanMeche wants to merge 1 commit into
mainfrom
fix/querySelector
Closed

JeanMeche wants to merge 1 commit into
mainfrom
fix/querySelector

Conversation

@JeanMeche

@JeanMeche JeanMeche commented Jul 17, 2023 •

Copy link
Copy Markdown
Member

Also: commenting unused test code that prevented from running the unit tests.

Fixes angular/angular#51068

@jessicajaniuk jessicajaniuk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Other than the tests being commented out, this looks like it should be fine. Can you restore those tests?

Comment thread test/web-platform-tests.js Outdated
}

var testharness = require(__dirname + '/web-platform-tests/resources/testharness.js');
// var testharness = require(__dirname + '/web-platform-tests/resources/testharness.js');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please uncomment this file. While all the tests don't pass, we do have some that we need and rely on.

@JeanMeche JeanMeche Jul 17, 2023 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm probably missing some insights here. I was getting an error because that particular file doesn't exisit on the repo. Hense all the commented code.

Also to me that variable wasn't even used, the tests using the harness function were comment at the end of the file !

@AndrewKushnir

Copy link
Copy Markdown

FYI, this would be a breaking change, we should make sure we merge it once the main branch is available for v17 changes.

@JeanMeche

Copy link
Copy Markdown
Member Author

@AndrewKushnir While I get that it feels like a breaking change, I thought It would be more of a fix since we have a different behavior between Browser and SSR.

@AndrewKushnir

Copy link
Copy Markdown

While I get that it feels like a breaking change, I thought It would be more of a fix since we have a different behavior between Browser and SSR.

@JeanMeche agreed, this is a legit fix, but it'd still be breaking for cases where there is a strict comparison like document.querySelector('my-cmp') !== undefined, so we'd need to avoid breaking this pattern in a minor or a patch release.

@mwyld

mwyld commented Feb 15, 2024

Copy link
Copy Markdown

Hi Angular team, do you have an update on when you think this issue will be resolved?

Also: commenting unused tests code that prevented running the unit tests.

Fixes angular/angular#51068
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.

bug: bundled domino incorrectly returns undefined instead of null for querySelector

5 participants