@toruslabs/ethereum-controllers 5.2.2 → 5.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1054,9 +1054,11 @@ const idleTimeTracker = (activityThresholdTime => {
1054
1054
  isIdle = true;
1055
1055
  }, activityThresholdTime * 1000);
1056
1056
  };
1057
- window.addEventListener("load", resetTimer);
1058
- document.addEventListener("mousemove", resetTimer);
1059
- document.addEventListener("keydown", resetTimer);
1057
+ if (typeof window !== "undefined" && typeof document !== "undefined") {
1058
+ window.addEventListener("load", resetTimer);
1059
+ document.addEventListener("mousemove", resetTimer);
1060
+ document.addEventListener("keydown", resetTimer);
1061
+ }
1060
1062
  function checkIfIdle() {
1061
1063
  return isIdle;
1062
1064
  }