fix(core): make properties enumerable

This commit is contained in:
Ibby Hadeed 2017-03-24 15:07:44 -04:00
parent 25d5169251
commit a151295654

View File

@ -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];
},