From d1cd22a6ddb96dadb45385ba1238e30e2b1bd6c6 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Tue, 16 Sep 2014 15:10:35 -0400
Subject: [PATCH] Avoid errors when contacts widget is missing (in derived skins for example)

---
 skins/larry/ui.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index 153abdc..2a6bffe 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -507,7 +507,8 @@
 //    $('#composeformbuttons')[(btns ? 'show' : 'hide')]();
 
     var abooks = $('#directorylist');
-    $('#compose-contacts .scroller').css('top', abooks.position().top + abooks.outerHeight());
+    if (abooks.length)
+      $('#compose-contacts .scroller').css('top', abooks.position().top + abooks.outerHeight());
   }
 
 

--
Gitblit v1.9.1