diff --git a/package.json b/package.json index 72240978..914d53c5 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" }, diff --git a/src/async/ScriptjsLoader.js b/src/async/ScriptjsLoader.js index 5e4c37d8..db9a9dfe 100644 --- a/src/async/ScriptjsLoader.js +++ b/src/async/ScriptjsLoader.js @@ -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"; @@ -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 = {