@open-tender/cloud 0.5.25 → 0.5.27

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.
@@ -13,13 +13,23 @@ const modalSlice = (0, toolkit_1.createSlice)({
13
13
  initialState,
14
14
  reducers: {
15
15
  openModal: (state, action) => {
16
- document.body.classList.add('has-modal');
16
+ try {
17
+ document.body.classList.add('has-modal');
18
+ }
19
+ catch (_a) {
20
+ // Ignore on mobile
21
+ }
17
22
  const { type, args = null } = action.payload;
18
23
  state.type = type;
19
24
  state.args = args;
20
25
  },
21
26
  closeModal: state => {
22
- document.body.classList.remove('has-modal');
27
+ try {
28
+ document.body.classList.remove('has-modal');
29
+ }
30
+ catch (_a) {
31
+ // Ignore on mobile
32
+ }
23
33
  state.type = null;
24
34
  }
25
35
  }
@@ -9,13 +9,23 @@ const modalSlice = createSlice({
9
9
  initialState,
10
10
  reducers: {
11
11
  openModal: (state, action) => {
12
- document.body.classList.add('has-modal');
12
+ try {
13
+ document.body.classList.add('has-modal');
14
+ }
15
+ catch (_a) {
16
+ // Ignore on mobile
17
+ }
13
18
  const { type, args = null } = action.payload;
14
19
  state.type = type;
15
20
  state.args = args;
16
21
  },
17
22
  closeModal: state => {
18
- document.body.classList.remove('has-modal');
23
+ try {
24
+ document.body.classList.remove('has-modal');
25
+ }
26
+ catch (_a) {
27
+ // Ignore on mobile
28
+ }
19
29
  state.type = null;
20
30
  }
21
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/cloud",
3
- "version": "0.5.25",
3
+ "version": "0.5.27",
4
4
  "description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",