mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 01:13:56 +03:00
a13a78e3fe
**BREAKING CHANGE:** Breaking changes for `@swc/helpers`. A new major version `0.5.0` is required. **Related issue:** - Closes https://github.com/swc-project/swc/issues/7157
22 lines
616 B
JavaScript
22 lines
616 B
JavaScript
import { _super_prop_base } from "./_super_prop_base.js";
|
|
|
|
export function _get(target, property, receiver) {
|
|
if (typeof Reflect !== "undefined" && Reflect.get) _get = Reflect.get;
|
|
else {
|
|
_get = function get(target, property, receiver) {
|
|
var base = _super_prop_base(target, property);
|
|
|
|
if (!base) return;
|
|
|
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
|
|
if (desc.get) return desc.get.call(receiver || target);
|
|
|
|
return desc.value;
|
|
};
|
|
}
|
|
|
|
return _get(target, property, receiver || target);
|
|
}
|
|
export { _get as _ };
|