mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
fix(core): make properties enumerable
This commit is contained in:
parent
25d5169251
commit
a151295654
@ -259,6 +259,7 @@ export function CordovaInstance(opts: any = {}) {
|
||||
*/
|
||||
export function CordovaProperty(target: any, key: string) {
|
||||
Object.defineProperty(target, key, {
|
||||
enumerable: true,
|
||||
get: () => {
|
||||
if (checkAvailability(target, key) === true) {
|
||||
return getPlugin(target.constructor.getPluginRef())[key];
|
||||
@ -282,6 +283,7 @@ export function CordovaProperty(target: any, key: string) {
|
||||
*/
|
||||
export function InstanceProperty(target: any, key: string) {
|
||||
Object.defineProperty(target, key, {
|
||||
enumerable: true,
|
||||
get: function(){
|
||||
return this._objectInstance[key];
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user