import { getCurrentInstance, onMounted, nextTick } from 'vue';

function tryOnMounted(fn, sync = true) {
  if (getCurrentInstance())
    onMounted(fn);
  else if (sync)
    fn();
  else
    nextTick(fn);
}

export { tryOnMounted };
//# sourceMappingURL=index.mjs.map
