shogun-button-react 1.5.15 → 1.5.16

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.
@@ -34,7 +34,8 @@ export function ShogunButtonProvider({ children, sdk, options, onLoginSuccess, o
34
34
  if (!sdk)
35
35
  return;
36
36
  // Verifichiamo se l'utente è già loggato all'inizializzazione
37
- if (sdk.isLoggedIn()) {
37
+ // Aggiungiamo un controllo di sicurezza per verificare se il metodo esiste
38
+ if (sdk && typeof sdk.isLoggedIn === "function" && sdk.isLoggedIn()) {
38
39
  const pub = (_b = (_a = sdk.gun.user()) === null || _a === void 0 ? void 0 : _a.is) === null || _b === void 0 ? void 0 : _b.pub;
39
40
  if (pub) {
40
41
  setIsLoggedIn(true);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shogun-button-react",
3
3
  "description": "Shogun connector button",
4
- "version": "1.5.15",
4
+ "version": "1.5.16",
5
5
  "files": [
6
6
  "dist",
7
7
  "src/styles/index.css"