Commits

Jon Nylander committed 9ee73ff

Continuing work on integrating both IP and geolocation API - questions remain. Should geolocation take precedence over javascript results. IP results should definitely not.

Comments (0)

Files changed (1)

detect_timezone.js

         },
         
         tz_lookup_callback = function (ip_timezone_data) {
-            if (ip_timezone_data.timezone !== preliminary_result.name()) {
-                preliminary_result.compare_with(ip_timezone_data);
-                config.callback(preliminary_result);
-                return;
+            if (ip_timezone_data) {
+                if (ip_timezone_data.timezone !== preliminary_result.name()) {
+                    preliminary_result.compare_with(ip_timezone_data);
+                }
             }
             config.callback(preliminary_result);
         },