diff --git a/CHANGELOG.md b/CHANGELOG.md index 43507fbc..2f6c56a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [11.2.0](https://github.com/react-native-netinfo/react-native-netinfo/compare/v11.1.1...v11.2.0) (2023-12-05) + + +### Features + +* **web:** add support for Tizen and WebOS ([#703](https://github.com/react-native-netinfo/react-native-netinfo/issues/703)) ([030887e](https://github.com/react-native-netinfo/react-native-netinfo/commit/030887e)) + ## [11.1.1](https://github.com/react-native-netinfo/react-native-netinfo/compare/v11.1.0...v11.1.1) (2023-11-29) diff --git a/package.json b/package.json index c6fabca4..b45a7cc0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-community/netinfo", - "version": "11.1.1", + "version": "11.2.0", "description": "React Native Network Info API for iOS & Android", "react-native": "src/index.ts", "types": "lib/typescript/src/index.d.ts", diff --git a/src/internal/nativeModule.web.ts b/src/internal/nativeModule.web.ts index d4f5e05f..cfbf5a33 100644 --- a/src/internal/nativeModule.web.ts +++ b/src/internal/nativeModule.web.ts @@ -75,7 +75,7 @@ declare global { const isWindowPresent = typeof window !== 'undefined'; // Check if window exists and if the browser supports the connection API -const connection = isWindowPresent +const connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS')) ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection