(url, ms = 2500)
| 4238 | |
| 4239 | // tiny fetch helper with timeout for folder counts |
| 4240 | function _fetchJSONWithTimeout(url, ms = 2500) { |
| 4241 | const ctrl = new AbortController(); |
| 4242 | const tid = setTimeout(() => ctrl.abort(), ms); |
| 4243 | return fetch(url, { credentials: 'include', signal: ctrl.signal }) |
| 4244 | .then(r => r.ok ? r.json() : { folders: 0, files: 0, __fr_err: 1 }) |
| 4245 | .catch(() => ({ folders: 0, files: 0, __fr_err: 1 })) |
| 4246 | .finally(() => clearTimeout(tid)); |
| 4247 | } |
| 4248 | |
| 4249 | // Defensive: some browsers occasionally blank out inline SVGs elsewhere when a context menu opens. |
| 4250 | // This only repaints *blank* strip/inline-folder icons (no re-render churn when nothing is wrong). |
no outgoing calls
no test coverage detected