[extensions-web] js: Don't send the search parameter if it's empty
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] js: Don't send the search parameter if it's empty
- Date: Sun, 1 Apr 2012 13:43:58 +0000 (UTC)
commit fb25b2af4e39cece3af3795759ab1898acefdb35
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Apr 1 09:43:43 2012 -0400
js: Don't send the search parameter if it's empty
Django seems to have issues with parsing empty parameters.
sweettooth/static/js/paginator.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/static/js/paginator.js b/sweettooth/static/js/paginator.js
index 42108a2..e5b5aaa 100644
--- a/sweettooth/static/js/paginator.js
+++ b/sweettooth/static/js/paginator.js
@@ -30,7 +30,8 @@ define(['jquery', 'hashParamUtils', 'paginatorUtils', 'dbus!_', 'templates', 'jq
queryParams.page = 1;
if (queryParams.shell_version === undefined)
queryParams.shell_version = dbusProxy.ShellVersion;
- queryParams.search = $('#search_input').val();
+ if ($('#search_input').val())
+ queryParams.search = $('#search_input').val();
currentRequest = $.ajax({
url: '/extension-query/',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]