Explorar o código

error badge resolved

Gennadysht %!s(int64=2) %!d(string=hai) anos
pai
achega
23375b6fd6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      js/lesson21_Module/index.html

+ 1 - 1
js/lesson21_Module/index.html

@@ -483,7 +483,7 @@
             if (state.cartReducer) {
                 let cartItems = Object.values(state.cartReducer);
                 for (item of  Object.values(state.cartReducer))
-                     cartItemsCount = item.count;
+                     cartItemsCount += item.count; //
             }
             cartCountBadge.setAttribute("value", cartItemsCount);
             console.log({ state: store.getState() });