@dnax/core 0.24.4 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -95,7 +95,7 @@ class useRest {
95
95
  };
96
96
 
97
97
  constructor(options: options) {
98
- this.#c = options.c;
98
+ this.#c = options?.c;
99
99
  this.#useCustomApi = options.useCustomApi ?? true;
100
100
  this.#tenant_id = options.tenant_id;
101
101
  this.#session = null;
@@ -559,6 +559,7 @@ class useRest {
559
559
  > {
560
560
  return new Promise(async (resolve, reject) => {
561
561
  try {
562
+ if (!params) params = {};
562
563
  if (options?.cleanDeep) {
563
564
  params = cleanDeep(params);
564
565
  }
@@ -122,7 +122,7 @@ function buildPipeline(params: findParam, col?: Collection | undefined | null) {
122
122
  }
123
123
 
124
124
  // project
125
- if (params.$project) {
125
+ if (params?.$project) {
126
126
  pipeline.push({
127
127
  $project: params.$project,
128
128
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.24.4",
3
+ "version": "0.25.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {