Pman.GoogleTranslate.js
authorChris <chris@roojs.com>
Wed, 2 Apr 2014 10:15:17 +0000 (18:15 +0800)
committerChris <chris@roojs.com>
Wed, 2 Apr 2014 10:15:17 +0000 (18:15 +0800)
Pman.GoogleTranslate.js

index 5196725..d6a153a 100644 (file)
@@ -140,8 +140,11 @@ Pman.GoogleTranslate = function(str, src, dest, cb, force) {
                 src  : src,
                 dest : dest,
             },
-            success: function()
+            success: function(o)
             {
+                if (!o.data) {
+                        return o;
+                    }
 //                Roo.MessageBox.alert("Success", "We logged in OK")
                 return o.data.translations[0].translatedText;
             },