fix: tsc error (#37932)

* fix: tsc issue

* fix: typo
pull/37937/head
vagusX 2 years ago committed by GitHub
parent e372e1b993
commit 760cb38dbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -168,7 +168,7 @@ describe('message.config', () => {
});
it('should be able to config getContainer, although messageInstance already exists', () => {
function createContainer() {
function createContainer(): [HTMLElement, () => void] {
const container = document.createElement('div');
document.body.appendChild(container);
return [

@ -55,7 +55,7 @@ expect.addSnapshotSerializer({
// Clean up `data-reactroot` since React 18 do not have this
children.forEach((ele: HTMLElement) => {
if (ele && typeof ele === 'object' && ele.removeAttribute !== undefined) {
if (typeof ele.removeAttribute === 'function') {
ele.removeAttribute('data-reactroot');
}
});

Loading…
Cancel
Save