Unhandled error during execution of scheduler flush
Version
3.2.11
Reproduction link
Steps to reproduce
<template v-if="acFlag !== 'background'">
<MBaseConfig />
<component v-for="c in configComponent?configComponent:[]" :key="c" :is="c" />
</template>
setup() {
const store = useStore();
const configComponent = ref([]);
watch(
() => store.state.acComponent?.config,
(config: any) => {
if (!!config) {
configComponent.value = config.map((o: string) => M${o.replace(o[0], o[0].toUpperCase())}
);
} else {
configComponent.value = [];
}
for (let c in configComponent.value) {
console.log(configComponent.value[c])
}
}, {
immediate: true,
deep: true
}
);
return {
configComponent
};
}
What is expected?
fix this bug
What is actually happening?
The project runs well in serve mode; but after I built the project, it reported the bug:Unhandled error during execution of scheduler flush. This is likely a Vue internals bug.
I change the vue version to 3.2.11. but it still report this bug in build mode; remember to run it in build mode, because there is no bug in serve mode.
Please reduce the reproduction to a smaller scope - ideally using https://sfc.vuejs.org.