socket.io encodes undefined as an string
This commit is contained in:
parent
b0679dc175
commit
d870625db5
1 changed files with 5 additions and 1 deletions
|
|
@ -319,7 +319,11 @@ module.exports = (
|
||||||
*/
|
*/
|
||||||
const listener = async (data, key) => {
|
const listener = async (data, key) => {
|
||||||
try {
|
try {
|
||||||
if (publicKeyForDecryption) {
|
if (
|
||||||
|
typeof publicKeyForDecryption === 'string' &&
|
||||||
|
publicKeyForDecryption !== 'undefined' &&
|
||||||
|
publicKeyForDecryption.length > 15
|
||||||
|
) {
|
||||||
const decData = await deepDecryptIfNeeded(
|
const decData = await deepDecryptIfNeeded(
|
||||||
data,
|
data,
|
||||||
publicKeyForDecryption
|
publicKeyForDecryption
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue