Skip to content

Commit

Permalink
fix(core): make properties enumerable
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Mar 24, 2017
1 parent 25d5169 commit a151295
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/@ionic-native/core/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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];
},
Expand Down

0 comments on commit a151295

Please sign in to comment.