mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-03 02:42:05 +00:00
[fix] remove invariant error from Portal
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
* @flow
|
* @flow
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import invariant from 'fbjs/lib/invariant'
|
|
||||||
import Platform from '../../apis/Platform'
|
import Platform from '../../apis/Platform'
|
||||||
import React, { Component, PropTypes } from 'react'
|
import React, { Component, PropTypes } from 'react'
|
||||||
import StyleSheet from '../../apis/StyleSheet'
|
import StyleSheet from '../../apis/StyleSheet'
|
||||||
@@ -81,10 +80,6 @@ class Portal extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
invariant(
|
|
||||||
_portalRef === this || _portalRef === undefined,
|
|
||||||
'More than one Portal instance detected. Never use <Portal> in your code.'
|
|
||||||
)
|
|
||||||
_portalRef = this
|
_portalRef = this
|
||||||
if (!this.state.modals) { return null }
|
if (!this.state.modals) { return null }
|
||||||
const modals = []
|
const modals = []
|
||||||
|
|||||||
Reference in New Issue
Block a user