You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have middleware that sets socket.data and one of this object properties can be null. When socket.io-admin-ui in development mode it runs registerVerboseListeners function. Which laters calls createProxy function on "connection" event for every filed inside socket.data. Inside createProxy there is a check:
if (typeof obj !== "object") { return obj; }
but typeof null is also "object" so it will pass and will try to init new Proxy with null as target - new Proxy(null, ...) which will throw an error - "TypeError: Cannot create proxy with a non-object as target or handler" or similar.
In my case it also crash whole app when this error occur.
The text was updated successfully, but these errors were encountered:
I have middleware that sets socket.data and one of this object properties can be null. When socket.io-admin-ui in development mode it runs
registerVerboseListeners
function. Which laters callscreateProxy
function on "connection" event for every filed inside socket.data. InsidecreateProxy
there is a check:if (typeof obj !== "object") { return obj; }
but typeof null is also "object" so it will pass and will try to init new Proxy with null as target -
new Proxy(null, ...)
which will throw an error - "TypeError: Cannot create proxy with a non-object as target or handler" or similar.In my case it also crash whole app when this error occur.
The text was updated successfully, but these errors were encountered: