浏览代码

Fix bug: ingredient updating did not show immediately on frontend.

Lee Morgan 5 年之前
父节点
当前提交
0ebf4d53bf
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 4 0
      views/dashboardPage/bundle.js
  2. 4 0
      views/dashboardPage/js/classes/Merchant.js

+ 4 - 0
views/dashboardPage/bundle.js

@@ -168,6 +168,10 @@ class MerchantIngredient{
         }
     }
 
+    set quantity(quantity){
+        this._quantity = quantity;
+    }
+
     updateQuantity(quantity){
         this._quantity += this.convertToBase(quantity);
     }

+ 4 - 0
views/dashboardPage/js/classes/Merchant.js

@@ -41,6 +41,10 @@ class MerchantIngredient{
         }
     }
 
+    set quantity(quantity){
+        this._quantity = quantity;
+    }
+
     updateQuantity(quantity){
         this._quantity += this.convertToBase(quantity);
     }