FIXIT modify error during moving items ...

The problem was the forEach and inside ad await... it doesn't WORK !
RESOLVE:
 using normal FOR:
  for (const myelem of myarray) {
     await myfuncasync(...)
  }
This commit is contained in:
Paolo Arena
2019-02-20 19:17:29 +01:00
parent 77568f02f5
commit c77fe5b2f9
4 changed files with 48 additions and 32 deletions

View File

@@ -121,7 +121,7 @@ export default class Category extends Vue {
async deleteCategory(myarrobj) {
await myarrobj.forEach(myobj => {
for (const myobj of myarrobj) {
if (myobj.id !== undefined) {
console.log('KEY = ', myobj.id)
@@ -141,7 +141,7 @@ export default class Category extends Vue {
return deleteCount
}
}
})
}
}

View File

@@ -2,6 +2,7 @@ import Vue from 'vue'
import { Component, Watch } from 'vue-property-decorator'
import { ICategory } from '@src/model'
import globalroutines from "@src/globalroutines"
@Component({
})
@@ -116,7 +117,7 @@ export default class Tabledata extends Vue {
async deleteCategory(myarrobj) {
await myarrobj.forEach(myobj => {
for (const myobj of myarrobj) {
if (myobj.id !== undefined) {
console.log('KEY = ', myobj.id)
@@ -136,7 +137,7 @@ export default class Tabledata extends Vue {
return deleteCount
}
}
})
}
}