Subscribe on changes!

Unhandled error during execution of scheduler flush

avatar
Sep 14th 2021

Version

3.2.11

Reproduction link

gitee.com

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.

avatar
Sep 14th 2021

Please reduce the reproduction to a smaller scope - ideally using https://sfc.vuejs.org.

avatar
Sep 15th 2021

it is caused because I use a low version of element-plus when packaging, now it is solved.