diff --git a/samples/react-content-query-webpart/src/common/helpers/CamlQueryHelper.ts b/samples/react-content-query-webpart/src/common/helpers/CamlQueryHelper.ts
index 9e64bb124..34b166128 100644
--- a/samples/react-content-query-webpart/src/common/helpers/CamlQueryHelper.ts
+++ b/samples/react-content-query-webpart/src/common/helpers/CamlQueryHelper.ts
@@ -19,7 +19,7 @@ export class CamlQueryHelper {
// Generates the part
if(querySettings.filters && !isEmpty(querySettings.filters)) {
- let sortedFilters = querySettings.filters.sort((a, b) => { if(a.index > b.index) { return 1; } else { return 0; } });
+ let sortedFilters = querySettings.filters.sort((a, b) => { return a.index - b.index; });
query += Text.format('{0}', this.generateFilters(sortedFilters));
}