diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-03-28 17:05:04 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-03-28 17:05:04 -0500 |
commit | 5c307cf190201a7e29bf88537b4b4d9821c89294 (patch) | |
tree | 0412a0741a712015b0606e036b9221301acf6ad6 | |
parent | 251240c026cf6153be0b8fc5b78dcc0b33deefe2 (diff) | |
download | gitlab-ce-5c307cf190201a7e29bf88537b4b4d9821c89294.tar.gz |
typo
-rw-r--r-- | app/assets/javascripts/todos.js.coffee | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/assets/javascripts/todos.js.coffee b/app/assets/javascripts/todos.js.coffee index e9652ee411f..ee75e4a0b86 100644 --- a/app/assets/javascripts/todos.js.coffee +++ b/app/assets/javascripts/todos.js.coffee @@ -79,21 +79,21 @@ class @Todos # Do nothing if no pagination return if !currPages - # If new total of pages if different than we have now + # If new total of pages is different than we have now if newPages isnt currPages - # Redirect to previous page if thereĀ“s one available + # Redirect to previous page if there's one available if currPages > 1 and currPage is currPages url = @updateQueryStringParameter(url, 'page', currPages - 1) location.replace url updateQueryStringParameter: (uri, key, value) -> - separator = if uri.indexOf('?') isnt -1 then "&" else "?" + separator = if uri.indexOf('?') isnt -1 then '&' else '?' # Matches key and value - regex = new RegExp("([?&])" + key + "=.*?(&|#|$)", "i") + regex = new RegExp('([?&])' + key + '=.*?(&|#|$)', 'i') if uri.match(regex) - return uri.replace(regex, '$1' + key + "=" + value + '$2') + return uri.replace(regex, '$1' + key + '=' + value + '$2') - uri + separator + key + "=" + value + uri + separator + key + '=' + value |