Skip to content

Commit 7963533

Browse files
tests added.
1 parent 48ed8cf commit 7963533

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

src/LocationMessage/LocationMessage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class LocationMessage extends Component {
1414
}
1515

1616
buildURL(url) {
17-
var center = this.props.data;
17+
var center = this.props.data || {};
1818

1919
return url.replace('LATITUDE', center.latitude)
2020
.replace('LONGITUDE', center.longitude)
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`LocationMessage component should render without issues 1`] = `
4-
<a
5-
className="rce-mbox-location"
6-
href="https://maps.googleapis.com/maps/api/staticmap?markers=color:red|undefined,undefined&zoom=14&size=270x200&scale=2"
7-
target="_blank"
8-
>
9-
<img
10-
className="rce-mbox-location-img"
11-
src="https://maps.googleapis.com/maps/api/staticmap?markers=color:red|undefined,undefined&zoom=14&size=270x200&scale=2"
12-
/>
13-
</a>
4+
<div>
5+
<a
6+
className="rce-mbox-location"
7+
href="https://www.google.com/maps/search/?api=1&query=undefined,undefined&zoom=14"
8+
target="_blank"
9+
>
10+
<img
11+
className="rce-mbox-location-img"
12+
src="https://maps.googleapis.com/maps/api/staticmap?markers=color:red|undefined,undefined&zoom=14&size=270x200&scale=2&key="
13+
/>
14+
</a>
15+
</div>
1416
`;

0 commit comments

Comments
 (0)