mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Fixed Product API handling of original options
no-issue The default include values are empty arrays which are not falsy, so the boolean OR operator would never use the second operand. Instead we concatenate the options together so that the API can use all of them.
This commit is contained in:
parent
09a817da16
commit
76a54059b0
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ function paginatedProducts(page, _apiConfig, frame) {
|
|||
products: page.data.map((model) => {
|
||||
return cleanIncludes(
|
||||
allowedIncludes,
|
||||
requestedQueryIncludes || requestedOptionsIncludes,
|
||||
requestedQueryIncludes.concat(requestedOptionsIncludes),
|
||||
serializeProduct(model, frame.options, frame.apiType)
|
||||
);
|
||||
}),
|
||||
|
@ -48,7 +48,7 @@ function singleProduct(model, _apiConfig, frame) {
|
|||
products: [
|
||||
cleanIncludes(
|
||||
allowedIncludes,
|
||||
requestedQueryIncludes || requestedOptionsIncludes,
|
||||
requestedQueryIncludes.concat(requestedOptionsIncludes),
|
||||
serializeProduct(model, frame.options, frame.apiType)
|
||||
)
|
||||
]
|
||||
|
|
Loading…
Add table
Reference in a new issue