vuejs / devtools-v6

⚙️ Browser devtools extension for debugging Vue.js applications.
https://devtools-v6.vuejs.org/
MIT License
24.66k stars 4.15k forks source link

vue dev tools causes dynamic module registration to break application #978

Open rv-akim opened 5 years ago

rv-akim commented 5 years ago

Version

5.1.0

Browser and OS info

Chrome / OSX

Steps to reproduce

In my application, I'm consuming an api and ingesting the response into vuex state. During the ingestion process I'm looping through an array and dynamically registering modules for each element within the array of 10 elements.

In my code i'm simply deregistering some dynamically registered modules in this way:

getters.list.forEach((listEl) => {
  this.unregisterModule(['parent', 'list', listEl.id]);
});

When the modules get deregistered, I get an error of properties being undefined. It always successfully deregisters the first two instances then fails for the remaining 8. These errors only occur when the vue dev tools are open. This bit of functionality has worked fine for dev tools prior to v5.

What is expected?

Modules deregister and dev tools doesn't cause an error during deregistration process.

What is actually happening?

Devtools causes module deregistration to break.

rv-akim commented 5 years ago

I've recently switched back to v4.15 and it's working great for module deregistration if that's helpful for context

Akryum commented 5 years ago

Could you please provide a runnable minimal reproduction?