Skip to content

Commit 714fc0c

Browse files
author
Marcelo
committed
Merge branch 'IIMAGE-8'
2 parents 42bf1a7 + c289c71 commit 714fc0c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Gradle Project settings
22
projectName = imageshop
3-
version = 2.0.2
3+
version = 2.0.3
44

55
# XP App values
66
appDisplayName = ImageShop

src/main/resources/admin/widgets/iimage/iimage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ const libs = {
99
exports.get = function (req) {
1010
const contentId = req.params.contentId
1111
const sitesWithIImageAppInstalled = libs.iimage.getSitesWithIImageAppInstalled()
12-
13-
const content = libs.content.get({ key: req.params.contentId })
1412

1513
if (!sitesWithIImageAppInstalled.length) {
1614
return {
@@ -26,6 +24,8 @@ exports.get = function (req) {
2624
}
2725
}
2826

27+
const content = libs.content.get({ key: req.params.contentId })
28+
2929
const iimageAppConfig = libs.iimage.getSiteConfig(contentId || sitesWithIImageAppInstalled[0]._id)
3030

3131
if (['iimage_host'].some(key => Object.keys(iimageAppConfig).indexOf(key) === -1)) {

src/main/resources/lib/modules/iimage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function getInputsAllowedToUploadImage(contentId) {
7474

7575
if (connection) {
7676
const n = connection.draft.get(contentId)
77-
const parts = n.components ? n.components.filter(c => c.type === 'part') : []
77+
const parts = n.components ? libs.objects.forceArray(n.components).filter(c => c.type === 'part') : []
7878

7979
const processedParts = {}
8080

0 commit comments

Comments
 (0)