You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
553 B

4 years ago
  1. import superPropBase from "./superPropBase";
  2. export default function _get(target, property, receiver) {
  3. if (typeof Reflect !== "undefined" && Reflect.get) {
  4. _get = Reflect.get;
  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(receiver);
  12. }
  13. return desc.value;
  14. };
  15. }
  16. return _get(target, property, receiver || target);
  17. }