Skip to content

Commit

Permalink
Merge branch 'release/0.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Sep 11, 2023
2 parents 256ecd4 + d8f72bb commit e4cfaa1
Show file tree
Hide file tree
Showing 5 changed files with 381 additions and 319 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.20.1
16.20.2
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# druxt-layout-paragraphs

## 0.4.1

### Patch Changes

- fix(#51): prevent error if backend data unavailable

## 0.4.0

### Minor Changes
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "druxt-layout-paragraphs",
"version": "0.4.0",
"version": "0.4.1",
"keywords": [
"druxt",
"drupal",
Expand Down Expand Up @@ -30,15 +30,15 @@
"test:watch": "jest --watch"
},
"devDependencies": {
"@babel/core": "7.22.9",
"@babel/preset-env": "7.22.9",
"@babel/core": "7.22.15",
"@babel/preset-env": "7.22.15",
"@changesets/cli": "2.26.2",
"@vue/test-utils": "1.3.6",
"babel-core": "7.0.0-bridge.0",
"druxt": "0.22",
"druxt": "0.23",
"druxt-entity": "0.28",
"esbuild-jest": "0.5.0",
"eslint": "8.45.0",
"eslint": "8.48.0",
"eslint-plugin-nuxt": "3.2.0",
"jest": "27.5.1",
"jest-junit": "^16.0.0",
Expand Down
9 changes: 6 additions & 3 deletions src/components/DruxtFieldLayoutParagraphs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
:uuid="paragraph.id"
v-bind="{ ...$attrs }"
>
<template v-if="isLayout(paragraph)" #default="{ entity }">
<template
v-if="isLayout(paragraph)"
#default="{ entity }"
>
<DruxtLayoutParagraph
:entity="entity"
:children="getChildren(entity)"
Expand All @@ -27,7 +30,7 @@ export default {
mixins: [DruxtFieldMixin],
data: () => ({
paragraphs: undefined,
paragraphs: [],
}),
async fetch() {
Expand All @@ -48,7 +51,7 @@ export default {
*
* @return {object[]}
*/
rootParagraphs: ({ paragraphs, isLayout }) => paragraphs.filter((o) => isLayout(o) || (!isLayout(o) && !(o.attributes.behavior_settings.layout_paragraphs || {}).parent_uuid)),
rootParagraphs: ({ paragraphs, isLayout }) => (paragraphs || []).filter((o) => isLayout(o) || (!isLayout(o) && !(o.attributes.behavior_settings.layout_paragraphs || {}).parent_uuid)),
},
methods: {
Expand Down
Loading

0 comments on commit e4cfaa1

Please sign in to comment.