Closed
Description
Vue version
3.2.45
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-48q3zs?file=index.html
Steps to reproduce
Please clone the repo first and then run the project.
- Add items to the cart
- Remove the item from the cart in the cart screen. While removing the last item, an error will be shown in the console.
OR - Go back to the Shop page from the navbar.
What is expected?
The expected result must be that every item should be deleted and the UI must be updated.
What is actually happening?
Showing the error in the console and the UI is not updating, also the application stops responding.
System Info
System:
OS: Windows 10 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
Memory: 5.25 GB / 15.86 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.12.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.819.0), Chromium (108.0.1462.42)
Internet Explorer: 11.0.22621.1
Any additional comments?
Following is the error, that showed up.
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '__asyncLoader')
at isAsyncWrapper (runtime-core.esm-bundler.js:2272:40)
at unmount (runtime-core.esm-bundler.js:6090:40)
at unmountComponent (runtime-core.esm-bundler.js:6212:13)
at unmount (runtime-core.esm-bundler.js:6097:13)
at unmountChildren (runtime-core.esm-bundler.js:6241:13)
at unmount (runtime-core.esm-bundler.js:6115:17)
at patch (runtime-core.esm-bundler.js:5070:13)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:5711:17)
at ReactiveEffect.run (reactivity.esm-bundler.js:187:25)
at instance.update (runtime-core.esm-bundler.js:5745:56)
isAsyncWrapper @ runtime-core.esm-bundler.js:2272
unmount @ runtime-core.esm-bundler.js:6090
unmountComponent @ runtime-core.esm-bundler.js:6212
unmount @ runtime-core.esm-bundler.js:6097
unmountChildren @ runtime-core.esm-bundler.js:6241
unmount @ runtime-core.esm-bundler.js:6115
patch @ runtime-core.esm-bundler.js:5070
componentUpdateFn @ runtime-core.esm-bundler.js:5711
run @ reactivity.esm-bundler.js:187
instance.update @ runtime-core.esm-bundler.js:5745
callWithErrorHandling @ runtime-core.esm-bundler.js:157
flushJobs @ runtime-core.esm-bundler.js:390
Promise.then (async)
queueFlush @ runtime-core.esm-bundler.js:282
queueJob @ runtime-core.esm-bundler.js:276
(anonymous) @ runtime-core.esm-bundler.js:5743
triggerEffect @ reactivity.esm-bundler.js:397
triggerEffects @ reactivity.esm-bundler.js:387
trigger @ reactivity.esm-bundler.js:355
set2 @ reactivity.esm-bundler.js:526
removeFromCart @ store.js:30
onClick @ CartView.vue:48
callWithErrorHandling @ runtime-core.esm-bundler.js:157
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:166
invoker @ runtime-dom.esm-bundler.js:345