@amohamud23/notihub 1.1.20 → 1.1.21

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.
package/dist/index.cjs CHANGED
@@ -267,7 +267,9 @@ var User = class _User {
267
267
  * @returns A promise that resolves to the updated user object.
268
268
  */
269
269
  static async updateUser(id, user) {
270
- const updateFields = Object.keys(user);
270
+ const updateFields = Object.keys(user).filter(
271
+ (key) => user[key] !== void 0
272
+ );
271
273
  if (updateFields.length === 0) {
272
274
  throw new Error("No fields provided to update.");
273
275
  }
package/dist/index.js CHANGED
@@ -234,7 +234,9 @@ var User = class _User {
234
234
  * @returns A promise that resolves to the updated user object.
235
235
  */
236
236
  static async updateUser(id, user) {
237
- const updateFields = Object.keys(user);
237
+ const updateFields = Object.keys(user).filter(
238
+ (key) => user[key] !== void 0
239
+ );
238
240
  if (updateFields.length === 0) {
239
241
  throw new Error("No fields provided to update.");
240
242
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amohamud23/notihub",
3
- "version": "1.1.20",
3
+ "version": "1.1.21",
4
4
  "description": "Notihub Package",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.cts",