From 5cd8699e88eee403e904da2bded609e918682d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Vatle?= Date: Sat, 29 Jun 2024 22:18:04 +0300 Subject: [PATCH] Move _collections into static namespace --- packages/mongo/collection.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/mongo/collection.js b/packages/mongo/collection.js index d2419d2733..e47911d924 100644 --- a/packages/mongo/collection.js +++ b/packages/mongo/collection.js @@ -27,12 +27,6 @@ export function warnUsingOldApi(methodName, collectionName, isCalledFromAsync) { */ Mongo = {}; -/** - * @summary A record of all defined collections - * @type {Map} - */ -Mongo._collections = new Map(); - /** * @summary Constructor for a Collection * @locus Anywhere @@ -529,6 +523,13 @@ Object.assign(Mongo.Collection, { return selector; }, + + /** + * @summary A record of all defined Mongo.Collection instances, indexed by collection name. + * @type {Map} + * @protected + */ + _collections: new Map(), }); Object.assign(Mongo.Collection.prototype, {