()
| 16 | useEffect(() => { |
| 17 | if (!editorState?.project.isReadOnly) { |
| 18 | const checkVersion = async () => { |
| 19 | if (document['hidden'] === false) { |
| 20 | const isCurrent = await editorState.autosaveWatcher.projectLoader.isCurrentVersion(editorState?.project) |
| 21 | if (!isCurrent) { |
| 22 | reloadProject() |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | window.addEventListener('visibilitychange', checkVersion) |
| 27 | return () => { |
| 28 | window.removeEventListener('visibilitychange', checkVersion) |
nothing calls this directly
no test coverage detected