@jetthai/cuora 1.1.366-dev-6 → 1.1.366-dev-8

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.366-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.366-dev-7...v1.1.366-dev-8) (2025-07-31)
6
+
7
+ ### [1.1.366-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.366-dev-6...v1.1.366-dev-7) (2025-07-31)
8
+
5
9
  ### [1.1.366-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.366-dev-5...v1.1.366-dev-6) (2025-07-31)
6
10
 
7
11
  ### [1.1.368](https://github.com/jetthai/cuora-module/compare/v1.1.366-dev-4...v1.1.368) (2025-07-28)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.366-dev-6",
3
+ "version": "1.1.366-dev-8",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -259,7 +259,7 @@ export default function (request) {
259
259
  },
260
260
  isEnd: (context, event) => {
261
261
  const { currentTab, inbox } = context
262
- if (!inbox[currentTab] || currentTab === 'FREE_GAME') {
262
+ if (!inbox[currentTab]) {
263
263
  return false
264
264
  } else {
265
265
  const { page, totalPage } = inbox[currentTab]
@@ -1,6 +1,12 @@
1
1
  export default {
2
2
  get(name, options) {
3
- const itemStr = localStorage.getItem(name)
3
+ let itemStr = null
4
+ try {
5
+ itemStr = localStorage.getItem(name)
6
+ } catch (error) {
7
+ console.error(`Error getting item from localStorage: ${error}`)
8
+ return null
9
+ }
4
10
 
5
11
  if (!itemStr) {
6
12
  return null
@@ -20,9 +26,17 @@ export default {
20
26
  if (options?.maxAge) {
21
27
  item.expiry = new Date().getTime() + options.maxAge * 1000
22
28
  }
23
- localStorage.setItem(name, JSON.stringify(item))
29
+ try {
30
+ localStorage.setItem(name, JSON.stringify(item))
31
+ } catch (error) {
32
+ console.error(`Error setting item in localStorage: ${error}`)
33
+ }
24
34
  },
25
35
  remove(name, options) {
26
- localStorage.removeItem(name)
36
+ try {
37
+ localStorage.removeItem(name)
38
+ } catch (error) {
39
+ console.error(`Error removing item from localStorage: ${error}`)
40
+ }
27
41
  },
28
42
  }