mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
startsWith() function of java script is not supported in IE, instead use startsWith() function of underscore string. Fixes #2347
This commit is contained in:
parent
f718e1f49c
commit
928c0d3de8
@ -14,7 +14,8 @@
|
||||
|
||||
// use alertify and underscore js
|
||||
var alertify = require("alertify"),
|
||||
_ = require("underscore");
|
||||
_ = require("underscore"),
|
||||
S = require("underscore.string");
|
||||
|
||||
/*---------------------------------------------------------
|
||||
Define functions used for various operations
|
||||
@ -173,7 +174,7 @@ var setUploader = function(path) {
|
||||
$('.storage_dialog #uploader .input-path').val(path);
|
||||
}
|
||||
} else if (!config.options.platform_type === "win32" &&
|
||||
(path == '' || !path.startsWith('/'))) {
|
||||
(path == '' || !S.startsWith(path, '/'))) {
|
||||
path = '/' + path;
|
||||
$('.storage_dialog #uploader .input-path').val(path);
|
||||
} else {
|
||||
@ -1488,7 +1489,7 @@ function InputObject() {
|
||||
path = path.replace(/\//g, '\\')
|
||||
} else {
|
||||
path = path.replace(/\\/g, '/')
|
||||
if (!path.startsWith('/')) {
|
||||
if (!S.startsWith(path, '/')) {
|
||||
path = '/' + path;
|
||||
}
|
||||
}
|
||||
|
@ -3089,8 +3089,10 @@ define(
|
||||
|
||||
$("#btn-flash").prop('disabled', true);
|
||||
|
||||
if (explain_prefix != undefined && !sql.trim().toUpperCase().startsWith("EXPLAIN"))
|
||||
if (explain_prefix != undefined &&
|
||||
!S.startsWith(sql.trim().toUpperCase(), "EXPLAIN")) {
|
||||
sql = explain_prefix + ' ' + sql;
|
||||
}
|
||||
|
||||
self.query_start_time = new Date();
|
||||
self.query = sql;
|
||||
|
Loading…
Reference in New Issue
Block a user