Skip to content

Commit

Permalink
Fix false positive DEV check
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Apr 4, 2024
1 parent 2e04870 commit 8194cf3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/platform/polyfills.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8194cf3

Please sign in to comment.