mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
added WARN_WHEN_USING_OLD_API for fetch as well
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
var Fiber = Npm.require('fibers');
|
||||
var warnUsingOldApi = require("./mongo_driver").warnUsingOldApi;
|
||||
|
||||
export class DocFetcher {
|
||||
constructor(mongoConnection) {
|
||||
@@ -19,9 +20,14 @@ export class DocFetcher {
|
||||
fetch(collectionName, id, op, callback) {
|
||||
const self = this;
|
||||
|
||||
|
||||
check(collectionName, String);
|
||||
check(op, Object);
|
||||
|
||||
// [FIBERS]
|
||||
// TODO: Remove this when 3.0 is released.
|
||||
warnUsingOldApi("fetch");
|
||||
|
||||
// If there's already an in-progress fetch for this cache key, yield until
|
||||
// it's done and return whatever it returns.
|
||||
if (self._callbacksForOp.has(op)) {
|
||||
|
||||
Reference in New Issue
Block a user