Invalid Attempt To Spread Non Iterable Instance

Invalid Attempt To Spread Non Iterable Instance



⚑ ALL INFORMATION CLICK HERE πŸ‘ˆπŸ»πŸ‘ˆπŸ»πŸ‘ˆπŸ»

































Invalid Attempt To Spread Non Iterable Instance

luizzz opened this issue
Mar 25, 2019
Β· 6 comments











xaksis





closed this


Apr 2, 2019




xgqfrms



mentioned this issue


Feb 15, 2020



Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment



Β© 2021 GitHub, Inc.
Terms
Privacy
Security
Status
Docs






Contact GitHub
Pricing
API
Training
Blog
About


What version are you using?
Latest version (2.16.3)
What browser?
Chrome version 73.0.3683.86
What did you expect to happen?
No console errors
What actually happened?
Console alerts. Btw, the table looks fine.
vue.esm.js:566 TypeError: Invalid attempt to spread non-iterable instance at vue-good-table.es.js:81 at v (vue-good-table.es.js:35) at vue-good-table.es.js:1667 at s (index.js:35) at e.exports (index.js:289) at a.paginated (vue-good-table.es.js:1664) at mt.get (vue.esm.js:2881) at mt.evaluate (vue.esm.js:2988) at a.paginated (vue.esm.js:3265) at a.selectedPageRows (vue-good-table.es.js:1458) z @ vue.esm.js:566
I had this happening as well - though in Nuxt.js it crashed the whole client application.
My workaround was to use a computed property like this -
Basically I think vue-good-table grabs the data array, but if there is no data in the array (something like that) it bugs out with this error message. My computed variable above returns [] which for some reason bypasses this issue.
Don't ask me how or why this works, but it worked for me - give it a go!
@luizzz @patrickbolle this happens if you provide a non-array object to rows property. If you're loading rows via asynchronous request, Just put a v-if on your table
For anyone it might help, this issue happened for me because I was trying to use a graphql query in the wrong way. I was doing the initial query which returned an object and then I was trying to refetch the same query but I was trying to return it in an items array. Once I removed the items[] the issue was solved.
GraphQL that had the issues:
graphql(myQuery, {
// items below was the issue
items: [
...fetchMoreResult.getData
]
}
})
})
},
data: props.data,
}
}
}),
After removing items (this fixed my issue)
graphql(myQuery, {
// items below was the issue
items: [
...fetchMoreResult.getData
]
}
})
})
},
data: props.data,
}
}
}),
Wel that depends. If rows is an object it will still error. As an object evaluates to true.
If you're using mapGetters to get your data via Vuex and are seeing this error, you simply need to change your vuex data variable's initial state from null to [].
Successfully merging a pull request may close this issue.

React - Redux App: β€œ Invalid attempt to spread non - iterable instance ” Issue
Invalid attempt to spread non - iterable instance Β· Issue #530...
Invalid attempt to spread non - iterable instance Β· Issue #316...
Invalid attempt to spread non - iterable instance Β· React
How I Fixed: TypeError: Invalid attempt to destructure non - iterable ...

Contact Support β€”
GitHub Status β€”
@githubstatus

You have triggered an abuse detection mechanism.
Please wait a few minutes before you try again;
in some cases this may take up to an hour.


Naked Silver
0 Private
Krissy Lynn Naughty America
Nudist 15
School Girl Fuck Porno

Report Page