optional chaining

This commit is contained in:
Henry Jameson 2026-08-04 15:59:52 +03:00
commit cf85b00c0a
26 changed files with 34 additions and 34 deletions

View file

@ -132,7 +132,7 @@ export const waitForEvent = (
return vi.waitFor(
() => {
const e = wrapper.emitted(event)
if (e && e.length >= timesEmitted) {
if (e?.length >= timesEmitted) {
return
}
throw new Error('event is not emitted')