Skip to content

Commit 507b919

Browse files
committed
Remove use of jquery for URL Search Param construction
1 parent 32e6aea commit 507b919

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nbgitpuller/static/js/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ GitSync.prototype._emit = function(event, data) {
3232

3333
GitSync.prototype.start = function() {
3434
// Start git pulling handled by SyncHandler, declared in handlers.py
35-
var syncUrlParams = {
35+
let syncUrlParams = new URLSearchParams({
3636
repo: this.repo,
3737
targetpath: this.targetpath
38-
}
38+
});
3939
if (typeof this.depth !== 'undefined' && this.depth != undefined) {
40-
syncUrlParams['depth'] = this.depth;
40+
syncUrlParams.append('depth', this.depth);
4141
}
4242
if (typeof this.branch !== 'undefined' && this.branch != undefined) {
43-
syncUrlParams['branch'] = this.branch;
43+
syncUrlParams.append('branch', this.branch);
4444
}
45-
var syncUrl = this.baseUrl + 'git-pull/api?' + $.param(syncUrlParams);
45+
var syncUrl = this.baseUrl + 'git-pull/api?' + syncUrlParams.toString();
4646

4747
this.eventSource = new EventSource(syncUrl);
4848
var that = this;

0 commit comments

Comments
 (0)