import { isVue3 } from '../vue';

function safeVueInstance(target) {
  if (!isVue3) {
    return target;
  }
  return new Proxy(target, {
    get(target, prop) {
      return prop in target ? target[prop] : undefined;
    }
  });
}

export { safeVueInstance };
