Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
metagrover committed Oct 12, 2017
2 parents 684198e + dcdcf98 commit 057725a
Show file tree
Hide file tree
Showing 25 changed files with 61 additions and 61 deletions.
6 changes: 3 additions & 3 deletions app/sensors/GeoDistanceDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default class GeoDistanceDropdown extends Component {

axios.get(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.locString}`)
.then((res) => {
if (res.data.results) {
if (Array.isArray(res.data.results) && res.data.results.length) {
const userLocation = res.data.results[0].formatted_address;
this.setState({
userLocation
Expand Down Expand Up @@ -214,7 +214,7 @@ export default class GeoDistanceDropdown extends Component {
if (value && value !== "") {
axios.get(`https://maps.googleapis.com/maps/api/geocode/json?address=${value}`)
.then((res) => {
if (res.data.results) {
if (Array.isArray(res.data.results) && res.data.results.length) {
const location = res.data.results[0].geometry.location;
this.locString = `${location.lat}, ${location.lng}`;
if (cb) {
Expand Down Expand Up @@ -394,7 +394,7 @@ export default class GeoDistanceDropdown extends Component {
value: place.description
});
});
if (this.state.userLocation.length && this.result.options[0].label !== "Use my current location") {
if (this.state.userLocation && this.state.userLocation.length && this.result.options[0].label !== "Use my current location") {
this.result.options.unshift({
label: "Use my current location",
value: this.state.userLocation
Expand Down
4 changes: 2 additions & 2 deletions app/sensors/GeoDistanceSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default class GeoDistanceSlider extends Component {

axios.get(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.locString}`)
.then((res) => {
if (res.data.results) {
if (Array.isArray(res.data.results) && res.data.results.length) {
const userLocation = res.data.results[0].formatted_address;
this.setState({
userLocation
Expand Down Expand Up @@ -197,7 +197,7 @@ export default class GeoDistanceSlider extends Component {
if (value && value !== "") {
axios.get(`https://maps.googleapis.com/maps/api/geocode/json?address=${value}`)
.then((res) => {
if (res.data.results) {
if (Array.isArray(res.data.results) && res.data.results.length) {
const location = res.data.results[0].geometry.location;
this.locString = `${location.lat}, ${location.lng}`;
if (cb) {
Expand Down
6 changes: 3 additions & 3 deletions dist/CustomQuery.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/GeoDistanceDropdown.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/GeoDistanceSlider.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/PlacesSearch.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/direction.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/earthquake.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/events.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/heatmap.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/list.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/meetupblast.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/nearby.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/now.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/transport.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/weather.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/sensors/GeoDistanceDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ var GeoDistanceDropdown = function (_Component) {
_this4.locString = location.coords.latitude + ", " + location.coords.longitude;

axios.get("https://maps.googleapis.com/maps/api/geocode/json?latlng=" + _this4.locString).then(function (res) {
if (res.data.results) {
if (Array.isArray(res.data.results) && res.data.results.length) {
var userLocation = res.data.results[0].formatted_address;
_this4.setState({
userLocation: userLocation
Expand Down Expand Up @@ -243,7 +243,7 @@ var GeoDistanceDropdown = function (_Component) {

if (value && value !== "") {
axios.get("https://maps.googleapis.com/maps/api/geocode/json?address=" + value).then(function (res) {
if (res.data.results) {
if (Array.isArray(res.data.results) && res.data.results.length) {
var location = res.data.results[0].geometry.location;
_this7.locString = location.lat + ", " + location.lng;
if (cb) {
Expand Down Expand Up @@ -423,7 +423,7 @@ var GeoDistanceDropdown = function (_Component) {
value: place.description
});
});
if (_this10.state.userLocation.length && _this10.result.options[0].label !== "Use my current location") {
if (_this10.state.userLocation && _this10.state.userLocation.length && _this10.result.options[0].label !== "Use my current location") {
_this10.result.options.unshift({
label: "Use my current location",
value: _this10.state.userLocation
Expand Down
4 changes: 2 additions & 2 deletions lib/sensors/GeoDistanceSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ var GeoDistanceSlider = function (_Component) {
_this3.locString = location.coords.latitude + ", " + location.coords.longitude;

axios.get("https://maps.googleapis.com/maps/api/geocode/json?latlng=" + _this3.locString).then(function (res) {
if (res.data.results) {
if (Array.isArray(res.data.results) && res.data.results.length) {
var userLocation = res.data.results[0].formatted_address;
_this3.setState({
userLocation: userLocation
Expand Down Expand Up @@ -216,7 +216,7 @@ var GeoDistanceSlider = function (_Component) {

if (value && value !== "") {
axios.get("https://maps.googleapis.com/maps/api/geocode/json?address=" + value).then(function (res) {
if (res.data.results) {
if (Array.isArray(res.data.results) && res.data.results.length) {
var location = res.data.results[0].geometry.location;
_this6.locString = location.lat + ", " + location.lng;
if (cb) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@appbaseio/reactivemaps",
"version": "1.4.0",
"version": "1.4.1",
"description": "Data Components for building map UIs",
"main": "lib/app.js",
"scripts": {
Expand All @@ -25,7 +25,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@appbaseio/reactivebase": "1.4.0",
"@appbaseio/reactivebase": "1.4.1",
"axios": "^0.15.2",
"classnames": "^2.2.5",
"google-map-react": "^0.14.5",
Expand Down
2 changes: 1 addition & 1 deletion playground/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div id="root"></div>
<div id="error-display"></div>
<script src="static/preview.6231695e378e4430d5db.bundle.js"></script>
<script src="static/preview.28cb69e10bfc0c67ae3b.bundle.js"></script>
</body>
</html>

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion umd/reactivemaps.js

Large diffs are not rendered by default.

Binary file modified umd/reactivemaps.js.br
Binary file not shown.
Binary file modified umd/reactivemaps.js.gzip
Binary file not shown.
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
grunt "~0.4.0"
serve-static "^1.10.2"

"@appbaseio/[email protected].0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@appbaseio/reactivebase/-/reactivebase-1.4.0.tgz#042aa193df6e3ff8287160cf0831722c62764960"
"@appbaseio/[email protected].1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@appbaseio/reactivebase/-/reactivebase-1.4.1.tgz#46d6b2213a0f9a384356eb8d893f48c1ed4239e6"
dependencies:
appbase-js "^2.1.0"
classnames "^2.2.5"
fbemitter "^2.1.1"
lodash "^4.17.4"
moment "^2.18.1"
moment "2.18.1"
prop-types "^15.6.0"
rc-slider "^8.3.1"
react-addons-shallow-compare "^15.4.2"
Expand Down

0 comments on commit 057725a

Please sign in to comment.