Photo browser action: allow to parse the array of photos (#653)
Fix bug that detects a JSON object instead of an array. Signed-off-by: Yannick Schaus <github@schaus.net>pull/661/head
parent
bf44997fe4
commit
99292f2456
|
@ -163,7 +163,7 @@ export const actionsMixin = {
|
||||||
const self = this
|
const self = this
|
||||||
let photos = actionConfig[prefix + 'actionPhotos']
|
let photos = actionConfig[prefix + 'actionPhotos']
|
||||||
let photoBrowserConfig = actionConfig[prefix + 'actionPhotoBrowserConfig']
|
let photoBrowserConfig = actionConfig[prefix + 'actionPhotoBrowserConfig']
|
||||||
if (typeof photos === 'string' && photos.startsWith('{')) photos = JSON.parse(photos)
|
if (typeof photos === 'string' && photos.startsWith('[')) photos = JSON.parse(photos)
|
||||||
if (typeof photoBrowserConfig === 'string' && photoBrowserConfig.startsWith('{')) photoBrowserConfig = JSON.parse(photoBrowserConfig)
|
if (typeof photoBrowserConfig === 'string' && photoBrowserConfig.startsWith('{')) photoBrowserConfig = JSON.parse(photoBrowserConfig)
|
||||||
if (photos && photos.length > 0) {
|
if (photos && photos.length > 0) {
|
||||||
const promises = photos.map((el) => {
|
const promises = photos.map((el) => {
|
||||||
|
|
Loading…
Reference in New Issue