From 1dd5cf5c249c34a6290a6504adf93c073f92eceb Mon Sep 17 00:00:00 2001 From: Brian S Date: Wed, 6 May 2020 19:20:46 -0400 Subject: [PATCH] Allow enumeration of object properties Vuex's reactive object allow us to enumerate its properties, but objects returned by `mapMultiRowFields` do not. I want to be able to shallow copy the object but cannot without `enumerable: true` set. --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index 90a88331..06481a8b 100644 --- a/src/index.js +++ b/src/index.js @@ -80,6 +80,7 @@ export const mapMultiRowFields = normalizeNamespace(( const fieldPath = `${path}[${fieldsObject[0]}].${fieldKey}`; return Object.defineProperty(prev, fieldKey, { + enumerable: true, get() { return store.getters[getterType](fieldPath); },