From 90a14a9e1b43aa4d7d9dd132781de48b7283a509 Mon Sep 17 00:00:00 2001 From: Mohammed Ashab Uddin Date: Sat, 25 Jul 2020 10:46:30 +0400 Subject: [PATCH] added default value to the object parameter --- whatsapp-web.js/src/models/product.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whatsapp-web.js/src/models/product.js b/whatsapp-web.js/src/models/product.js index 0878b60..8a01ddb 100644 --- a/whatsapp-web.js/src/models/product.js +++ b/whatsapp-web.js/src/models/product.js @@ -1,7 +1,7 @@ class Product { - constructor({ id = '', name = '', desc = '', cost = 0, image = null }) { + constructor({ id = '', name = '', desc = '', cost = 0, image = null } = {}) { this.id = id; this.name = name; this.desc = desc;