I am trying to do an ajax call using fetch. The database is ran through mongo and when using dummy data from a .json file, the map works correctly when decks: [], it gives the error.

```
class Home extends Component {
    constructor(props) {
        super(props);
        this.state = {
            error: null,
            isLoaded: false,
            decks: []
        };
    }

    componentDidMount() {
        fetch("/api/getAllDecks")
            .then(
                (result) => {
                    this.setState({
                        isLoaded: true,
                        decks: result.decks
                    });
                    console.log("hiiii");
                },
                (error) => {
                    this.setState({
                        isLoaded: true,
                        error
                    });
                    console.log('hryyyy');
                })
    }

    render() {
        const decks = this.state.decks;
        return (
            <div className='container'>
                {this.state.decks.map(decks => (
                    <MiniCard
                        word={decks.deckName}
                    />
                ))};
            </div>
        );
    };
}

```