Open CharlesHamel opened 8 years ago
This looks like a good bug fix. Is this project still being maintained?
Hi @CharlesHamel and @nodesocket,
Nope, it's a bad fix. It's a trick in order to do 2 things in one line of code (by the way, it makes it less readable).
Example :
let foo;
if (foo = testFunction()) {
// .... do something with foo result
}
Is the same as :
let foo = testFunction();
if (foo) {
// .... do something with foo result
}
Your PR introduce a bug as : LINE 16 fieldType is not defined, LINE 17 fieldType so could not be used as an equality, and LINE 18, as it's not initialised, could not provide a fromBsonValue as it's undefined.
It should be a conditional expression instead of an assignment