summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-06-22 12:08:46 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-06-22 12:22:42 -0400
commitb650f4669829064805fdeb5fb85ae0de88e35966 (patch)
tree117709e0949ffe4264f83fa26982e26cc2a40892
parent41cfd55f5501dc90a96d0e1812fbb197e35955ac (diff)
downloadnextcloud-server-b650f4669829064805fdeb5fb85ae0de88e35966.tar.gz
nextcloud-server-b650f4669829064805fdeb5fb85ae0de88e35966.zip
Fix variable checks for mounting Google Drive
-rw-r--r--apps/files_external/js/google.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_external/js/google.js b/apps/files_external/js/google.js
index 0d65cfda011..84c74c57421 100644
--- a/apps/files_external/js/google.js
+++ b/apps/files_external/js/google.js
@@ -11,7 +11,7 @@ $(document).ready(function() {
window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
params[key] = value;
});
- if (params['oauth_token'].length > 1 && decodeURIComponent(params['oauth_token']) == $(token).val() && params['oauth_verifier'].length > 1) {
+ if (params['oauth_token'] !== undefined && params['oauth_verifier'] !== undefined && decodeURIComponent(params['oauth_token']) == $(token).val()) {
var tr = $(this);
$.post(OC.filePath('files_external', 'ajax', 'google.php'), { step: 2, oauth_verifier: params['oauth_verifier'], request_token: $(token).val(), request_token_secret: $(token_secret).val() }, function(result) {
if (result && result.status == 'success') {