Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: unsafe read from
document
in server-side rendering
Currently, this module fails in SSR because it reads from the `document` global variable when it is evaluated at compile time. This fix moves reading the `document` variable from the top level of the module, into the body of the `activityDetector` function, whose contents are not evaluated when bundling. This allows the module to work as-is in apps that do SSR. See this issue: tuenti#10
- Loading branch information