Permalink
Browse files

Added checked for undefined tweets

  • Loading branch information...
wmwragg committed Mar 18, 2012
1 parent c92257a commit 34c4e796121fea25b3ba4ccf09c9f278dcdaff3c
Showing with 1 addition and 1 deletion.
  1. +1 −1 twittermap/twittermap.js
View
@@ -91,7 +91,7 @@
var tweetsCallback = function (tweets) {
// Only process the tweets if ther were some
- if (tweets !== null && tweets.length > 0) {
+ if (tweets !== undefined && tweets !== null && tweets.length > 0) {
for (var i = tweets.length - 1; i >= 0; i--) {
// Add a marker and popup for the tweet if it has a location
if (showTweet(tweets[i], sinceTweetsDate)) {

0 comments on commit 34c4e79

Please sign in to comment.