Skip to content

Commit

Permalink
fix(link-resolution): only resolve links in fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Rötsch authored and axe312ger committed Feb 13, 2018
1 parent b33ad0f commit f023267
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/entities/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function wrapEntry (data) {
export function wrapEntryCollection (data, {resolveLinks, removeUnresolved}) {
const wrappedData = mixinStringifySafe(toPlainObject(cloneDeep(data)))
if (resolveLinks) {
wrappedData.items = resolveResponse(wrappedData, {removeUnresolved})
wrappedData.items = resolveResponse(wrappedData, {removeUnresolved, itemEntryPoints: ['fields']})
}
return freezeSys(wrappedData)
}
2 changes: 1 addition & 1 deletion lib/paged-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function pagedSync (http, query, { resolveLinks, removeUnresolved
.then((response) => {
// clones response.items used in includes because we don't want these to be mutated
if (resolveLinks) {
response.items = resolveResponse(response, {resolveLinks, removeUnresolved})
response.items = resolveResponse(response, {removeUnresolved, itemEntryPoints: ['fields']})
}
// maps response items again after getters are attached
const mappedResponseItems = mapResponseItems(response.items)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
],
"dependencies": {
"@contentful/axios": "^0.18.0",
"contentful-resolve-response": "^1.0.2",
"contentful-resolve-response": "^1.1.3",
"contentful-sdk-core": "^5.0.1",
"json-stringify-safe": "^5.0.1",
"lodash": "^4.17.4"
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const baseBundleConfig = {

const defaultBabelLoader = {
test: /\.js?$/,
exclude: /node_modules(?!\/contentful-resolve-response)/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {}
}
Expand Down

0 comments on commit f023267

Please sign in to comment.