diff options
author | dan <dan.abramov@gmail.com> | 2024-04-04 22:54:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-04 22:54:18 +0100 |
commit | 575f390d7b4f295f9b163fb029cd2bd0088c83f9 (patch) | |
tree | b49ee72bfc7d7859b64ef39054bdfe31c2038239 /src | |
parent | 2e048706e9013fb808b5e302e3c540e34f1ea342 (diff) | |
download | voidsky-575f390d7b4f295f9b163fb029cd2bd0088c83f9.tar.zst |
Fix false positive DEV check (#3410)
Diffstat (limited to 'src')
-rw-r--r-- | src/platform/polyfills.web.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/platform/polyfills.web.ts b/src/platform/polyfills.web.ts index 06fbe5cc4..462f65a26 100644 --- a/src/platform/polyfills.web.ts +++ b/src/platform/polyfills.web.ts @@ -19,6 +19,14 @@ if (process.env.NODE_ENV !== 'production') { typeof msgOrError === 'string' && msgOrError.startsWith('Unexpected text node') ) { + if ( + msgOrError === + 'Unexpected text node: . A text node cannot be a child of a <View>.' + ) { + // This is due to a stray empty string. + // React already handles this fine, so RNW warning is a false positive. Ignore. + return + } const err = new Error(msgOrError) thrownErrors.add(err) throw err |