Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Binary operation argument type string is not compatible with type string

My editor (Webstorm) is giving me this weird message:

Binary operation argument type string is not compatible with type string

Here is the code that is causing the warning message:

const {masterid = '', type = ''} = req.query;

if (!masterid) {
    return res.status(500).send(new Error('Missing query param "masterid".'));
}

async.autoInject({

    patients(callback) {
        if(type && type !== 'staff'){
            return process.nextTick(callback);
        }
        store.get(`chat:presence:users:${masterid}`, callback)
    },

    users(callback) {
        if(type && type !== 'patient'){
            return process.nextTick(callback);
        }
        store.get(`chat:presence:patient:${masterid}`, callback);
    }

}, (err, results) => {

    if (err) {
        return res.status(err.code).send(err);
    }

    res.json(results);

});

maybe I am using the wrong syntax?

enter image description here

I am just trying to set default values for the variables..the syntax should be correct.

like image 911
Alexander Mills Avatar asked Sep 17 '18 23:09

Alexander Mills


1 Answers

It's a bug, please follow WEB-33226 for updates

like image 56
lena Avatar answered Nov 13 '22 12:11

lena