Can you spot the critical bug in this javascript code?

```js
function reloadResource(){
    fetch('https://example.com/api/resource', {
        method: 'GET',
        headers: {
            'Content-Type': 'application/json',
        },
    })
    .then(response => response.json())
    .then(data => {
        console.log('Success:', data);
        setInterval(reloadResource, 1000);
    })
    .catch((error) => {
        console.error('Error:', error);
    });
}
```
user
The critical bug is that the function reloadResource is called inside the "then" block, causing an infinite loop.
assistant
Can you fix that bug?
user