@wix/sdk-react 0.5.7 → 0.5.9

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.
@@ -24,7 +24,7 @@ function HostEnvironmentProvider(props) {
24
24
  useEffect(() => {
25
25
  if (props.host.environment) {
26
26
  setEnvironment(props.host.environment);
27
- } else {
27
+ } else if (props.host.channel) {
28
28
  const handle = props.host.channel.observeState(
29
29
  (_, env) => setEnvironment(env)
30
30
  );
package/build/index.cjs CHANGED
@@ -63,7 +63,7 @@ function HostEnvironmentProvider(props) {
63
63
  (0, import_react.useEffect)(() => {
64
64
  if (props.host.environment) {
65
65
  setEnvironment(props.host.environment);
66
- } else {
66
+ } else if (props.host.channel) {
67
67
  const handle = props.host.channel.observeState(
68
68
  (_, env) => setEnvironment(env)
69
69
  );
package/build/index.js CHANGED
@@ -24,7 +24,7 @@ function HostEnvironmentProvider(props) {
24
24
  useEffect(() => {
25
25
  if (props.host.environment) {
26
26
  setEnvironment(props.host.environment);
27
- } else {
27
+ } else if (props.host.channel) {
28
28
  const handle = props.host.channel.observeState(
29
29
  (_, env) => setEnvironment(env)
30
30
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wix/sdk-react",
3
- "version": "0.5.7",
4
- "license": "UNLICENSED",
3
+ "version": "0.5.9",
4
+ "license": "MIT",
5
5
  "main": "build/index.cjs",
6
6
  "module": "build/index.js",
7
7
  "browser": "build/browser/index.js",
@@ -31,27 +31,27 @@
31
31
  "typecheck": "tsc --noEmit"
32
32
  },
33
33
  "dependencies": {
34
- "@wix/sdk": "^1.12.11"
34
+ "@wix/sdk": "^1.15.9"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@testing-library/jest-dom": "^6.2.0",
41
- "@testing-library/react": "^14.1.2",
42
- "@types/react": "^18.2.46",
43
- "@vitest/ui": "^1.5.0",
44
- "@wix/ecom": "^1.0.531",
45
- "eslint": "^8.56.0",
40
+ "@testing-library/jest-dom": "^6.6.3",
41
+ "@testing-library/react": "^14.3.1",
42
+ "@types/react": "^18.3.18",
43
+ "@vitest/ui": "^1.6.0",
44
+ "@wix/ecom": "^1.0.886",
45
+ "eslint": "^8.57.1",
46
46
  "eslint-config-sdk": "0.0.0",
47
47
  "is-ci": "^3.0.1",
48
48
  "jsdom": "^22.1.0",
49
- "react": "^18.2.0",
50
- "react-dom": "^18.2.0",
49
+ "react": "^18.3.1",
50
+ "react-dom": "^18.3.1",
51
51
  "tsup": "^7.3.0",
52
- "typescript": "^5.3.3",
53
- "vitest": "^1.5.0",
54
- "vitest-teamcity-reporter": "^0.3.0"
52
+ "typescript": "^5.7.3",
53
+ "vitest": "^1.6.0",
54
+ "vitest-teamcity-reporter": "^0.3.1"
55
55
  },
56
56
  "wix": {
57
57
  "artifact": {
@@ -70,5 +70,5 @@
70
70
  "eslintConfig": {
71
71
  "extends": "sdk"
72
72
  },
73
- "falconPackageHash": "073c0dbf5acc1a228512be6a0d85ee21fcedc616e1fdaaabbb586f98"
73
+ "falconPackageHash": "54749f9c1cb8a30166685945f28d7eecbdc6e0f8012311802d561769"
74
74
  }