Prevent error if calling close of a floating UI which has not been opened.
can't access property "setAttribute", i.trigger is null
My use case for this is where I have embedded dropdown with a window event to close it, but if the embedded dropdown has not been opened the error is thrown.
Prevent error if calling close of a floating UI which has not been opened.
My use case for this is where I have embedded dropdown with a window event to close it, but if the embedded dropdown has not been opened the error is thrown.
I could prevent the error via additional parameters with an additional OR condition but I thought it made more sense to fix it here.