Download next.js/patches/@base-ui-components__react@1.0.0-beta.1.patch from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.4 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/patches/%40base-ui-components__react%401.0.0-beta.1.patch
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/patches/@base-ui-components__react@1.0.0-beta.1.patch
-
curl -L -o @base-ui-components__react@1.0.0-beta.1.patch https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/patches/%40base-ui-components__react%401.0.0-beta.1.patch
1.4 kB
| diff --git a/cjs/utils/detectBrowser.js b/cjs/utils/detectBrowser.js | |
| index ff68691c7e4e7063e7f1ca879ff731aa95534b19..d937075fc126a8e78e9ba63331f6edb3c4146834 100644 | |
| --- a/cjs/utils/detectBrowser.js | |
| +++ b/cjs/utils/detectBrowser.js | |
| function getNavigatorData() { | |
| }; | |
| } | |
| return { | |
| - platform: navigator.platform, | |
| - maxTouchPoints: navigator.maxTouchPoints | |
| + platform: navigator.platform ?? '', | |
| + maxTouchPoints: navigator.maxTouchPoints ?? -1 | |
| }; | |
| } | |
| function getUserAgent() { | |
| function getPlatform() { | |
| if (uaData?.platform) { | |
| return uaData.platform; | |
| } | |
| - return navigator.platform; | |
| + return navigator.platform ?? ''; | |
| } | |
| \ No newline at end of file | |
| diff --git a/esm/utils/detectBrowser.js b/esm/utils/detectBrowser.js | |
| index b67fcfa881acfb437178c0ce7e1cdcd6f3b58cfd..6c125681981d17b8fb1fd6f68b9ab0d19d9dc0ca 100644 | |
| --- a/esm/utils/detectBrowser.js | |
| +++ b/esm/utils/detectBrowser.js | |
| function getNavigatorData() { | |
| }; | |
| } | |
| return { | |
| - platform: navigator.platform, | |
| - maxTouchPoints: navigator.maxTouchPoints | |
| + platform: navigator.platform ?? '', | |
| + maxTouchPoints: navigator.maxTouchPoints ?? -1 | |
| }; | |
| } | |
| function getUserAgent() { | |
| function getPlatform() { | |
| if (uaData?.platform) { | |
| return uaData.platform; | |
| } | |
| - return navigator.platform; | |
| + return navigator.platform ?? ''; | |
| } | |