Skip to content

Commit

Permalink
Improved: code to initialise the querystring with empty string if no …
Browse files Browse the repository at this point in the history
…prop found (#324)
  • Loading branch information
amansinghbais committed Mar 22, 2024
1 parent 88b1428 commit cfe8eef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/store/modules/order/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const actions: ActionTree<OrderState, RootState> = {
async updateProductCount({ commit, state }, payload ) {
const item = state.current.items.find((item: any) => item.internalName === payload);

if(item) {
if (item) {
item.quantityAccepted = item.quantityAccepted ? parseInt(item.quantityAccepted) + 1 : 1;
commit(types.ORDER_CURRENT_UPDATED, state.current )
return { isUpdated: true, itemName: payload }
Expand Down
2 changes: 1 addition & 1 deletion src/views/AddProductModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default defineComponent({
},
data() {
return {
queryString: this.selectedSKU
queryString: this.selectedSKU ? this.selectedSKU : ''
}
},
props: ["selectedSKU"],
Expand Down
2 changes: 1 addition & 1 deletion src/views/AddProductToPOModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default defineComponent({
},
data() {
return {
queryString: this.selectedSKU
queryString: this.selectedSKU ? this.selectedSKU : ''
}
},
props: ["selectedSKU"],
Expand Down

0 comments on commit cfe8eef

Please sign in to comment.