mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-04-06 15:30:30 +08:00
chore: Add comment to clarify implementation.
This commit is contained in:
parent
c23031842a
commit
9521b738f7
@ -23,6 +23,10 @@ import * as pipelineOperators from 'mingo/operators/pipeline/index.js';
|
||||
import * as queryOperators from 'mingo/operators/query/index.js';
|
||||
import * as projectionOperators from 'mingo/operators/projection/index.js';
|
||||
|
||||
// "import * as" is returning different object structures when the connection is being
|
||||
// imported in the build or when running the tests.
|
||||
// So we check for the a default object with all the named exports, otherwise the
|
||||
// returned object has all the named exports.
|
||||
useOperators(OperatorType.ACCUMULATOR, accumulatorOperators.default || accumulatorOperators);
|
||||
useOperators(OperatorType.EXPRESSION, expressionOperators.default || expressionOperators);
|
||||
useOperators(OperatorType.PIPELINE, pipelineOperators.default || pipelineOperators);
|
||||
|
Loading…
x
Reference in New Issue
Block a user