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 6262 "react" : " ^15.0.0" ,
6363 "react-addons-test-utils" : " ^15.0.0" ,
6464 "react-dom" : " ^15.0.0" ,
65- "react-github-fork-ribbon" : " ^0.4.3 " ,
65+ "react-github-fork-ribbon" : " ^0.5.1 " ,
6666 "react-router-dom" : " ^4.2.2" ,
6767 "sinon" : " ^1.17.3" ,
6868 "style-loader" : " ^0.13.1" ,
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
33import ReactDOM from 'react-dom' ;
44import { camelize } from './lib/String' ;
55import { makeCancelable } from './lib/cancelablePromise' ;
6- import invariant from 'invariant' ;
76
87const mapStyles = {
98 container : {
@@ -54,10 +53,9 @@ export class Map extends React.Component {
5453 constructor ( props ) {
5554 super ( props ) ;
5655
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+ }
6159
6260 this . listeners = { } ;
6361 this . state = {
Original file line number Diff line number Diff line change 1- import invariant from 'invariant' ;
2-
31export const GoogleApi = function ( opts ) {
42 opts = opts || { } ;
53
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+ }
107
118 const apiKey = opts . apiKey ;
129 const libraries = opts . libraries || [ 'places' ] ;
@@ -16,7 +13,7 @@ export const GoogleApi = function(opts) {
1613 const googleVersion = opts . version || '3.31' ;
1714
1815 let script = null ;
19- let google = typeof window !== 'undefined' && window . google || null ;
16+ let google = ( typeof window !== 'undefined' && window . google ) || null ;
2017 let loading = false ;
2118 let channel = null ;
2219 let language = opts . language ;
You can’t perform that action at this time.
0 commit comments