[FIX] Error: useless setTimeout call (missing quotes around argument?)

I propose this fix for 8.0 branch, already merged in master with commit eb521562cd6eee2d2a0ce15b8abb89505799bb98

The fix solves the javascript error I get when im_chat module is installed and I try to reload the entire page on browser.
The error I get says:
```
Error: useless setTimeout call (missing quotes around argument?)
_________________________________________________________
http://127.0.0.1:8069/web/js/web.assets_backend/70b2568:4015
```

Also see line commented by @KangOl  in PR #3349