mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed variable scope issue in server.js
This commit is contained in:
parent
83b6a04763
commit
180630ce0e
@ -81,11 +81,11 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
callbacks: {
|
callbacks: {
|
||||||
/* Connect the server */
|
/* Connect the server */
|
||||||
connect_server: function(args){
|
connect_server: function(args){
|
||||||
var input = args || {};
|
var input = args || {},
|
||||||
obj = this,
|
obj = this,
|
||||||
t = pgBrowser.tree,
|
t = pgBrowser.tree,
|
||||||
i = input.item || t.selected(),
|
i = input.item || t.selected(),
|
||||||
d = i && i.length == 1 ? t.itemData(i) : undefined;
|
d = i && i.length == 1 ? t.itemData(i) : undefined;
|
||||||
|
|
||||||
if (!d)
|
if (!d)
|
||||||
return false;
|
return false;
|
||||||
@ -95,11 +95,11 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
},
|
},
|
||||||
/* Disconnect the server */
|
/* Disconnect the server */
|
||||||
disconnect_server: function(args) {
|
disconnect_server: function(args) {
|
||||||
var input = args || {};
|
var input = args || {},
|
||||||
obj = this,
|
obj = this,
|
||||||
t = pgBrowser.tree,
|
t = pgBrowser.tree,
|
||||||
i = 'item' in input ? input.item : t.selected(),
|
i = 'item' in input ? input.item : t.selected(),
|
||||||
d = i && i.length == 1 ? t.itemData(i) : undefined;
|
d = i && i.length == 1 ? t.itemData(i) : undefined;
|
||||||
|
|
||||||
if (!d)
|
if (!d)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user