0
0
This commit is contained in:
syuilo 2018-04-12 06:20:53 +09:00
parent 3ffae40085
commit a5ab80bf02

View File

@ -114,13 +114,13 @@ export const pack = (
let _file: any;
// Populate the file if 'file' is ID
if (mongodb.ObjectID.prototype.isPrototypeOf(file)) {
if (mongo.ObjectID.prototype.isPrototypeOf(file)) {
_file = await DriveFile.findOne({
_id: file
});
} else if (typeof file === 'string') {
_file = await DriveFile.findOne({
_id: new mongodb.ObjectID(file)
_id: new mongo.ObjectID(file)
});
} else {
_file = deepcopy(file);