@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 +3 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
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
|
}
|