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'm using an undocumented API method, lock.destroy(), and I encountered issue #907. After tracing the code, I think I've found a problematic comparison that leads to that issue:
Once destroy() is invoked, getEntity() returns undefined for both m and oldM, which means f(m) will be invoked with m being undefined, which then causes Uncaught TypeError: Cannot read property 'getIn' of undefined in #907.
Shouldn't this check instead be:
if (m && oldM && m != oldM) f(m);
...? Furthermore, since both m and oldM are both immutable-js Maps, shouldn't m != oldM instead be !m.equals(oldM)?
The text was updated successfully, but these errors were encountered:
Auth0 Lock v10.20.0
I'm using an undocumented API method,
lock.destroy()
, and I encountered issue #907. After tracing the code, I think I've found a problematic comparison that leads to that issue:lock/src/store/index.js
Lines 8 to 10 in 7f0e0b5
Once
destroy()
is invoked,getEntity()
returnsundefined
for bothm
andoldM
, which meansf(m)
will be invoked withm
beingundefined
, which then causesUncaught TypeError: Cannot read property 'getIn' of undefined
in #907.Shouldn't this check instead be:
if (m && oldM && m != oldM) f(m);
...? Furthermore, since both
m
andoldM
are bothimmutable-js
Maps, shouldn'tm != oldM
instead be!m.equals(oldM)
?The text was updated successfully, but these errors were encountered: