In peer-data.js the method for getting user data Skylink.prototype.getUserData has a faulty if block which checks if userData is null or undefined like below
Hence, when userData was not a null value, the condition still would go inside the if block setting userData to blank string. Evaluated as ( !(true && false) ) => !(false) => true
Purpose of this PR
In
peer-data.js
the method for getting user dataSkylink.prototype.getUserData
has a faulty if block which checks ifuserData
isnull
orundefined
like belowif ( !(userData !== null && typeof userData === 'undefined') )
Hence, when
userData
was not anull
value, the condition still would go inside the if block settinguserData
to blank string. Evaluated as( !(true && false) )
=>!(false)
=>true
This condition is now changed to below:
if ( !(userData !== null && typeof userData !== 'undefined') )
For more details, please refer to JIRA TICKET