Skip to content

Commit

Permalink
Merge pull request #1 from zachwhalen/master
Browse files Browse the repository at this point in the history
This should fix the "Cannot read property [0.0] from undefined" error
  • Loading branch information
antgiant committed Mar 13, 2020
2 parents 9550cda + 3669420 commit 31bb8ec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions BotCode.gs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,11 @@ function generateSingleTweet() {
while (tweet.match(/ {2}/g)) {
tweet = tweet.replace(/ {2}/, ' ');
}
doTweet(tweet, tempID[i]);
if (properties.constructor == "scheduled") {
doTweet(tweet, tempID[i]);
}else{
doTweet(tweet);
}
} else {
Logger.log("Too short, or some other problem.");
Logger.log(tweet);
Expand Down Expand Up @@ -667,4 +671,4 @@ function getSnek(imgUrl) {
var result = response.getContent();
return Utilities.base64Encode(result);

}
}

0 comments on commit 31bb8ec

Please sign in to comment.