[extensions-web] Fix fallback some more.



commit 70950fd4837c2996f430883c528956896d0e5f1e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Sep 26 16:08:30 2011 -0400

    Fix fallback some more.

 sweettooth/static/js/dbus.js       |    9 +++++++--
 sweettooth/static/js/extensions.js |    2 ++
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/sweettooth/static/js/dbus.js b/sweettooth/static/js/dbus.js
index 9f588b7..05514ca 100644
--- a/sweettooth/static/js/dbus.js
+++ b/sweettooth/static/js/dbus.js
@@ -42,8 +42,13 @@ define({
             }
 
             var apiVersion;
-            if (window.SweetTooth)
-                apiVersion = window.SweetTooth.apiVersion;
+
+            try {
+                if (window.SweetTooth)
+                    apiVersion = window.SweetTooth.apiVersion;
+            } except (e) {
+                apiVersion = null;
+            }
 
             if (apiVersion) {
                 var scriptname = './versions/' + apiVersion + '/main';
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index 0cbc1bc..3245596 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -58,6 +58,8 @@ function($, messages, dbusProxy) {
 
         $.fn.fillInErrors = function() {
         };
+
+        return;
     }
 
     // uuid => elem



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]