Skip to content

Commit

Permalink
Fixing GIT bugs. Grrr
Browse files Browse the repository at this point in the history
  • Loading branch information
ZermattChris committed Oct 11, 2023
1 parent 3b23bc8 commit 484231c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/store/storex.js
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ export default new Vuex.Store({
//console.log(state._flightsList)

// if we have a valid Array then loop through looking for the matching Flight Object's body.
if (state._flightsList == null) return null
if (isIterable(state.selectedFlight) === false) return null

for (const flghtObj of state._flightsList) {
//console.log(flghtObj)
Expand All @@ -1041,6 +1041,19 @@ export default new Vuex.Store({
});


/**
* Determine whether the given `input` is iterable.
*
* @returns {Boolean}
*/
function isIterable(input) {
if (input === null || input === undefined) {
return false
}

return typeof input[Symbol.iterator] === 'function'
}


/*****************************************************
// helper functions for working with Passenger Objects.
Expand Down

0 comments on commit 484231c

Please sign in to comment.