diff --git a/.circleci/config.yml b/.circleci/config.yml index f0c3edb..66a445e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,6 +51,7 @@ jobs: - run: name: Publish command: | + npm run build if [ "$CIRCLE_BRANCH" == "master" ]; then npm run publish fi diff --git a/src/plugin.js b/src/plugin.js index a403b27..f2c2480 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -20,11 +20,7 @@ export const resolve = (value$, getKeys, getObservable, keyName = 'id') => { return combineLatest( keys.map(key => getObservable(key).pipe( - map(value => { - const valueWithKey = { ...value }; - valueWithKey[keyName] = key; - return valueWithKey; - }) + map(value => Object.assign({ [keyName]: key }, value)) ) ) );