From a3ed90af3e6b1731a299422c9bca19e4def972fb Mon Sep 17 00:00:00 2001 From: Enok <416828041@qq.com> Date: Wed, 1 Apr 2020 20:09:41 +0800 Subject: [PATCH] Fix aggreate type convert --- README.md | 2 +- mod.ts | 2 +- ts/collection.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d1cf5b2b..aee5dcfe 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ ## Examples ```ts -import { init, MongoClient } from "https://deno.land/x/mongo@v0.5.0/mod.ts"; +import { init, MongoClient } from "https://deno.land/x/mongo@v0.5.1/mod.ts"; // Initialize the plugin await init(); diff --git a/mod.ts b/mod.ts index d2b86db9..4d3fb1b4 100644 --- a/mod.ts +++ b/mod.ts @@ -4,5 +4,5 @@ export * from "./ts/database.ts"; export * from "./ts/result.ts"; export { ObjectId } from "./ts/types.ts"; export * from "./ts/util.ts"; -export const VERSION = "v0.5.0"; +export const VERSION = "v0.5.1"; export const RELEASE_URL = `https://github.com/manyuanrong/deno_mongo/releases/download/${VERSION}`; \ No newline at end of file diff --git a/ts/collection.ts b/ts/collection.ts index 4475c9e8..bfce2985 100644 --- a/ts/collection.ts +++ b/ts/collection.ts @@ -1,8 +1,8 @@ import { MongoClient } from "./client.ts"; import { UpdateResult } from "./result.ts"; import { CommandType, FindOptions } from "./types.ts"; +import { convert, parse } from "./type_convert.ts"; import { dispatchAsync, encode } from "./util.ts"; -import { parse, convert } from "./type_convert.ts"; export class Collection { constructor( @@ -162,7 +162,7 @@ export class Collection { }) ) ); - return docs as T[]; + return parse(docs) as T[]; } public async createIndexes(