Skip to content

Commit

Permalink
feat(ScriptjsLoader): check with propTypesElementOfType(GoogleMap)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchentw committed Nov 21, 2015
1 parent 1818cff commit e8bb97b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"scripts": {
"clean": "rimraf lib",
"prebuild": "npm run lint && npm run clean",
"build:watch": "npm run build -- --watch",
"build": "babel src --out-dir lib",
"lint": "eslint .",
"pretest:cov": "npm run lint",
Expand Down Expand Up @@ -86,6 +87,7 @@
"invariant": "^2.1.1",
"lodash.isequal": "^3.0.4",
"marker-clusterer-plus": "^2.1.2",
"react-prop-types-element-of-type": "^1.0.2",
"scriptjs": "^2.5.8",
"warning": "^2.1.0"
},
Expand Down
6 changes: 5 additions & 1 deletion src/async/ScriptjsLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import {
PropTypes,
} from "react";

import {
default as propTypesElementOfType,
} from "react-prop-types-element-of-type";

import {
default as canUseDOM,
} from "can-use-dom";
Expand All @@ -27,7 +31,7 @@ export default class ScriptjsLoader extends Component {
...urlObjDefinition,
// PropTypes for ScriptjsLoader
loadingElement: PropTypes.node,
googleMapElement: PropTypes.element.isRequired,
googleMapElement: propTypesElementOfType(GoogleMap).isRequired,
}

state = {
Expand Down

0 comments on commit e8bb97b

Please sign in to comment.