diff --git a/packages/core/src/usestyle/UseStyle.js b/packages/core/src/usestyle/UseStyle.js index 95dd4b2b6..ec35f3f0b 100644 --- a/packages/core/src/usestyle/UseStyle.js +++ b/packages/core/src/usestyle/UseStyle.js @@ -6,7 +6,7 @@ import { isClient, isExist, setAttribute, setAttributes } from '@primeuix/utils/ import { getCurrentInstance, nextTick, onMounted, readonly, ref, watch } from 'vue'; function tryOnMounted(fn, sync = true) { - if (getCurrentInstance()) onMounted(fn); + if (getCurrentInstance() && getCurrentInstance().components) onMounted(fn); else if (sync) fn(); else nextTick(fn); }