get.js 551 B

1234567891011121314151617
  1. import superPropBase from "./superPropBase.js";
  2. export default function _get() {
  3. if (typeof Reflect !== "undefined" && Reflect.get) {
  4. _get = Reflect.get.bind();
  5. } else {
  6. _get = function _get(target, property, receiver) {
  7. var base = superPropBase(target, property);
  8. if (!base) return;
  9. var desc = Object.getOwnPropertyDescriptor(base, property);
  10. if (desc.get) {
  11. return desc.get.call(arguments.length < 3 ? target : receiver);
  12. }
  13. return desc.value;
  14. };
  15. }
  16. return _get.apply(this, arguments);
  17. }