diff --git a/src/chart/index.ts b/src/chart/index.ts index 913d49bec8..fa9f4c2eb9 100644 --- a/src/chart/index.ts +++ b/src/chart/index.ts @@ -64,9 +64,8 @@ export default abstract class Chart { const keys = { span: -1, date: -1 - }; - if (grouped) - keys.group = -1; + } as any; + if (grouped) keys.group = -1; this.collection.createIndex(keys, { unique: true }); }