Skip to content

Commit 53336e5

Browse files
committed
better variable naming in updateUrl calculation
1 parent 56ef034 commit 53336e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/resources/views/crud/inc/datatables_logic.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ functionsToRunOnDataTablesDrawEvent: [],
7676
fn.apply(window, args);
7777
},
7878
updateUrl : function (new_url) {
79-
base_url = "{{ url($crud->route) }}";
80-
new_url = new_url.replace(base_url, '');
81-
new_url = new_url.replace('/search', '');
82-
new_url = base_url + new_url;
83-
79+
url_start = "{{ url($crud->route) }}";
80+
url_end = new_url.replace(url_start, '');
81+
url_end = url_end.replace('/search', '');
82+
new_url = url_start + url_end;
83+
8484
window.history.pushState({}, '', new_url);
8585
localStorage.setItem('{{ Str::slug($crud->getRoute()) }}_list_url', new_url);
8686
},

0 commit comments

Comments
 (0)