diff --git a/calendar.module b/calendar.module
index 354665e..6a116e1 100644
--- a/calendar.module
+++ b/calendar.module
@@ -157,6 +157,10 @@ function calendar_preprocess_date_views_pager(&$vars) {
         }
       }
 
+      if (!isset($type)) {
+        $type = '';
+      }
+
       //$type = !empty($display->display_options['style_options']['calendar_type']) ? $display->display_options['style_options']['calendar_type'] : '';
       $path = calendar_granularity_path($view, $type);
       $calendar_links[$current_path]['tabs'][$type] = array('title' => $title, 'path' => $path);
