Permalink
Browse files

Merge pull request #7258 from borjasalguero/bug_806352_rebased

Bug 806352 - [Contacts] Sending SMS from contact detail doesn't open Mes...
  • Loading branch information...
2 parents fdc0b4f + c0accf3 commit 484defd77f6151afb50a7892275366a486efb9be Francisco Borja Salguero Castellano committed Dec 31, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 apps/sms/js/sms.js
View
6 apps/sms/js/sms.js
@@ -146,9 +146,11 @@ var MessageManager = {
} else {
// As soon as we click in the thread, we visually mark it
// as read.
- document.getElementById('thread_' + num)
- .getElementsByTagName('a')[0].classList
+ var threadRead = document.getElementById('thread_' + num);
+ if (threadRead) {
+ threadRead.getElementsByTagName('a')[0].classList
.remove('unread');
+ }
this.getMessages(ThreadUI.renderMessages,
filter, true, function() {
MessageManager.slide(function() {

0 comments on commit 484defd

Please sign in to comment.