Commit 4c146466 authored by Tristan Cavelier's avatar Tristan Cavelier

query serializer undefined id fixed

parent 292e3733
...@@ -14,8 +14,8 @@ function objectToSearchText(query) { ...@@ -14,8 +14,8 @@ function objectToSearchText(query) {
return str_list.join(" "); return str_list.join(" ");
} }
if (query.type === "simple") { if (query.type === "simple") {
return query.id + (query.id ? ": " : "") + (query.operator || "=") + ' "' + return (query.key ? query.key + ": " : "") +
query.value + '"'; (query.operator || "=") + ' "' + query.value + '"';
} }
throw new TypeError("This object is not a query"); throw new TypeError("This object is not a query");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment