File tree Expand file tree Collapse file tree 4 files changed +11
-16
lines changed Expand file tree Collapse file tree 4 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 62
62
"react" : " ^15.0.0" ,
63
63
"react-addons-test-utils" : " ^15.0.0" ,
64
64
"react-dom" : " ^15.0.0" ,
65
- "react-github-fork-ribbon" : " ^0.4.3 " ,
65
+ "react-github-fork-ribbon" : " ^0.5.1 " ,
66
66
"react-router-dom" : " ^4.2.2" ,
67
67
"sinon" : " ^1.17.3" ,
68
68
"style-loader" : " ^0.13.1" ,
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
3
3
import ReactDOM from 'react-dom' ;
4
4
import { camelize } from './lib/String' ;
5
5
import { makeCancelable } from './lib/cancelablePromise' ;
6
- import invariant from 'invariant' ;
7
6
8
7
const mapStyles = {
9
8
container : {
@@ -54,10 +53,9 @@ export class Map extends React.Component {
54
53
constructor ( props ) {
55
54
super ( props ) ;
56
55
57
- invariant (
58
- props . hasOwnProperty ( 'google' ) ,
59
- 'You must include a `google` prop.'
60
- ) ;
56
+ if ( ! props . hasOwnProperty ( 'google' ) ) {
57
+ throw new Error ( 'You must include a `google` prop' ) ;
58
+ }
61
59
62
60
this . listeners = { } ;
63
61
this . state = {
Original file line number Diff line number Diff line change 1
- import invariant from 'invariant' ;
2
-
3
1
export const GoogleApi = function ( opts ) {
4
2
opts = opts || { } ;
5
3
6
- invariant (
7
- opts . hasOwnProperty ( 'apiKey' ) ,
8
- 'You must pass an apiKey to use GoogleApi'
9
- ) ;
4
+ if ( ! opts . hasOwnProperty ( 'apiKey' ) ) {
5
+ throw new Error ( 'You must pass an apiKey to use GoogleApi' ) ;
6
+ }
10
7
11
8
const apiKey = opts . apiKey ;
12
9
const libraries = opts . libraries || [ 'places' ] ;
@@ -16,7 +13,7 @@ export const GoogleApi = function(opts) {
16
13
const googleVersion = opts . version || '3.31' ;
17
14
18
15
let script = null ;
19
- let google = typeof window !== 'undefined' && window . google || null ;
16
+ let google = ( typeof window !== 'undefined' && window . google ) || null ;
20
17
let loading = false ;
21
18
let channel = null ;
22
19
let language = opts . language ;
You can’t perform that action at this time.
0 commit comments