Hello,
I’m trying to test for equality between two properties in an object using the $where operator with a string, like this:
{ "$where": "this.var1 === this.var2" }
However, when running this in a browser environment, it fails with the Uncaught ReferenceError: process is not defined exception, since it's checking for !process.env.CSP_ENABLED internally. And process is undefined in browser environments.
I'm wondering of what's the expected behavior for $where in cases like this? Do you think it's necessary to restrict it due to potential security concerns?
Hello,
I’m trying to test for equality between two properties in an object using the $where operator with a string, like this:
However, when running this in a browser environment, it fails with the
Uncaught ReferenceError: process is not definedexception, since it's checking for!process.env.CSP_ENABLEDinternally. Andprocessis undefined in browser environments.I'm wondering of what's the expected behavior for
$wherein cases like this? Do you think it's necessary to restrict it due to potential security concerns?