Skip to content
This repository has been archived by the owner on Dec 29, 2021. It is now read-only.

Commit

Permalink
Quick fix: check if location exists before calling methods on it.
Browse files Browse the repository at this point in the history
  • Loading branch information
manastungare committed May 15, 2014
1 parent f22b80c commit 5dfef9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/feeds.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ feeds.fetchEventsFromCalendar_ = function(feed, callback) {
// The Location field will always contain whatever text was in the gd:where field.
// If the location happens to also contain a video chat URL, then we extract that
// into a new field, and ignore the Location field when rendering.
if (eventObj.location.indexOf('https://') > -1) {
if (eventObj.location && eventObj.location.indexOf('https://') > -1) {
var maybeUrl = eventObj.location.match(/(https\:\/\/[^ ,]*)/);
if (maybeUrl.length > 1) {
eventObj.video_call_url = maybeUrl[1];
Expand Down

0 comments on commit 5dfef9b

Please sign in to comment.