mirror of
https://github.com/google-map-react/google-map-react.git
synced 2025-12-08 18:26:32 +00:00
Fix React 0.13 support
This commit is contained in:
parent
d4d7f85844
commit
d566fe843d
@ -22,9 +22,18 @@ import raf from './utils/raf';
|
||||
import assign from 'lodash/object/assign';
|
||||
import isNumber from 'lodash/lang/isNumber';
|
||||
|
||||
const ReactDOM = isReact14(React)
|
||||
? require('react-dom')
|
||||
: React;
|
||||
// To avoid Error with React 13, webpack will generate warning not error
|
||||
// more details is here https://github.com/orgsync/react-list/pull/54
|
||||
let ReactDOM;
|
||||
if (isReact14(React)) {
|
||||
try {
|
||||
ReactDOM = require('react-dom');
|
||||
} catch (e) {
|
||||
ReactDOM = React;
|
||||
}
|
||||
} else {
|
||||
ReactDOM = React;
|
||||
}
|
||||
|
||||
|
||||
const kEPS = 0.00001;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user