mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
23 lines
600 B
JavaScript
23 lines
600 B
JavaScript
|
var superPropBase = require("./superPropBase");
|
||
|
|
||
|
function _get(target, property, receiver) {
|
||
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
||
|
module.exports = _get = Reflect.get;
|
||
|
} else {
|
||
|
module.exports = _get = function _get(target, property, receiver) {
|
||
|
var base = superPropBase(target, property);
|
||
|
if (!base) return;
|
||
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
||
|
|
||
|
if (desc.get) {
|
||
|
return desc.get.call(receiver);
|
||
|
}
|
||
|
|
||
|
return desc.value;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
return _get(target, property, receiver || target);
|
||
|
}
|
||
|
|
||
|
module.exports = _get;
|