Skip to content

Commit

Permalink
Fix removal of antecedent '?' or '&' in fidRemove
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtech-dobes committed Mar 6, 2013
1 parent 0c6650b commit c988eae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/fidRemove.ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ $.nette.ext('fidRemove', {
}, {
timeout: 3000,
removeFid: function (url, pos) {
if ((url.substr(url.length - 1) === '?') || (url.substr(url.length - 1) === '&')) {
url = url.substr(0, url.length - 1);
url = url.substr(0, pos) + url.substr(pos + 9);
if ((url.substr(pos - 1, 1) === '?') || (url.substr(pos - 1, 1) === '&')) {
url = url.substr(0, pos - 1) + url.substr(pos);
}
return url;
}
Expand Down

0 comments on commit c988eae

Please sign in to comment.