-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix fetchContainers if only one resource in container
- Loading branch information
Showing
6 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
15 changes: 14 additions & 1 deletion
15
src/frontend/packages/semantic-data-provider/dist/index.cjs.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/frontend/packages/semantic-data-provider/dist/index.cjs.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 14 additions & 1 deletion
15
src/frontend/packages/semantic-data-provider/dist/index.es.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/frontend/packages/semantic-data-provider/dist/index.es.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
src/frontend/packages/semantic-data-provider/src/dataProvider/utils/arrayOf.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const arrayOf = value => { | ||
// If the field is null-ish, we suppose there are no values. | ||
if (!value) { | ||
return []; | ||
} | ||
// Return as is. | ||
if (Array.isArray(value)) { | ||
return value; | ||
} | ||
// Single value is made an array. | ||
return [value]; | ||
}; | ||
|
||
export default arrayOf; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters