Skip to content

Commit

Permalink
fix warning on empty requires
Browse files Browse the repository at this point in the history
  • Loading branch information
rasteiner committed Feb 3, 2022
1 parent 82aa53b commit a6c68e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ panel.plugin("rasteiner/conditionalblocks", {

provide() {
return {
constraints: this.requires,
constraints: (this.requires && !Array.isArray(this.requires)) ? this.requires : {},
};
},
props: {
requires: {
type: Object,
type: Object|Array,
required: false,
},
},
Expand Down

0 comments on commit a6c68e1

Please sign in to comment.