Fix consistent typo in environment.js
environmnets => environments
This commit is contained in:
parent
75b64debb9
commit
c5741e57c2
1 changed files with 5 additions and 5 deletions
|
@ -18,7 +18,7 @@
|
|||
* The environments array is a recursive tree structure and we need to filter
|
||||
* both root level environments and children environments.
|
||||
*
|
||||
* In order to acomplish that, both `filterState` and `filterEnvironmnetsByState`
|
||||
* In order to acomplish that, both `filterState` and `filterEnvironmentsByState`
|
||||
* functions work together.
|
||||
* The first one works as the filter that verifies if the given environment matches
|
||||
* the given state.
|
||||
|
@ -34,9 +34,9 @@
|
|||
* @param {Array} array
|
||||
* @return {Array}
|
||||
*/
|
||||
const filterEnvironmnetsByState = (fn, arr) => arr.map((item) => {
|
||||
const filterEnvironmentsByState = (fn, arr) => arr.map((item) => {
|
||||
if (item.children) {
|
||||
const filteredChildren = filterEnvironmnetsByState(fn, item.children).filter(Boolean);
|
||||
const filteredChildren = filterEnvironmentsByState(fn, item.children).filter(Boolean);
|
||||
if (filteredChildren.length) {
|
||||
item.children = filteredChildren;
|
||||
return item;
|
||||
|
@ -81,7 +81,7 @@
|
|||
|
||||
computed: {
|
||||
filteredEnvironments() {
|
||||
return filterEnvironmnetsByState(filterState(this.visibility), this.state.environments);
|
||||
return filterEnvironmentsByState(filterState(this.visibility), this.state.environments);
|
||||
},
|
||||
|
||||
scope() {
|
||||
|
@ -102,7 +102,7 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Fetches all the environmnets and stores them.
|
||||
* Fetches all the environments and stores them.
|
||||
* Toggles loading property.
|
||||
*/
|
||||
created() {
|
||||
|
|
Loading…
Reference in a new issue