@jetbrains/ring-ui 6.0.77 → 6.0.78

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.
@@ -23,6 +23,12 @@ const DEFAULT_AGREEMENT = {
23
23
  requiredForREST: false,
24
24
  content: ''
25
25
  };
26
+ function ignorePostponedCatchReason(reason) {
27
+ if (reason === 'Postponed') {
28
+ return;
29
+ }
30
+ throw reason;
31
+ }
26
32
  export default class UserAgreementService {
27
33
  config;
28
34
  constructor(config) {
@@ -54,14 +60,9 @@ export default class UserAgreementService {
54
60
  userConsent = DEFAULT_CONSENT;
55
61
  intervalId;
56
62
  startChecking = () => {
57
- this.intervalId = window.setInterval(() => this.checkConsentAndShowDialog().catch(reason => {
58
- if (reason === 'Postponed') {
59
- return;
60
- }
61
- throw reason;
62
- }), this.interval);
63
+ this.intervalId = window.setInterval(() => this.checkConsentAndShowDialog().catch(ignorePostponedCatchReason), this.interval);
63
64
  window.addEventListener('storage', this.onStorageEvent);
64
- this.checkConsentAndShowDialog();
65
+ this.checkConsentAndShowDialog().catch(ignorePostponedCatchReason);
65
66
  };
66
67
  stopChecking = () => {
67
68
  clearInterval(this.intervalId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "6.0.77",
3
+ "version": "6.0.78",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",