diff --git a/components/indexeddb-backbonejs-adapter/backbone-indexeddb.js b/components/indexeddb-backbonejs-adapter/backbone-indexeddb.js index 2a7e93b9011b..6a094d9e8679 100644 --- a/components/indexeddb-backbonejs-adapter/backbone-indexeddb.js +++ b/components/indexeddb-backbonejs-adapter/backbone-indexeddb.js @@ -421,13 +421,15 @@ }); } else if (options.index) { index = store.index(options.index.name); + var excludeLower = !!options.index.excludeLower; + var excludeUpper = !!options.index.excludeUpper; if (index) { if (options.index.lower && options.index.upper) { - bounds = IDBKeyRange.bound(options.index.lower, options.index.upper); + bounds = IDBKeyRange.bound(options.index.lower, options.index.upper, excludeLower, excludeUpper); } else if (options.index.lower) { - bounds = IDBKeyRange.lowerBound(options.index.lower); + bounds = IDBKeyRange.lowerBound(options.index.lower, excludeLower); } else if (options.index.upper) { - bounds = IDBKeyRange.upperBound(options.index.upper); + bounds = IDBKeyRange.upperBound(options.index.upper, excludeUpper); } else if (options.index.only) { bounds = IDBKeyRange.only(options.index.only); } diff --git a/js/components.js b/js/components.js index f2188b02bdf8..29ce1cc21342 100644 --- a/js/components.js +++ b/js/components.js @@ -21779,13 +21779,15 @@ return jQuery; }); } else if (options.index) { index = store.index(options.index.name); + var excludeLower = !!options.index.excludeLower; + var excludeUpper = !!options.index.excludeUpper; if (index) { if (options.index.lower && options.index.upper) { - bounds = IDBKeyRange.bound(options.index.lower, options.index.upper); + bounds = IDBKeyRange.bound(options.index.lower, options.index.upper, excludeLower, excludeUpper); } else if (options.index.lower) { - bounds = IDBKeyRange.lowerBound(options.index.lower); + bounds = IDBKeyRange.lowerBound(options.index.lower, excludeLower); } else if (options.index.upper) { - bounds = IDBKeyRange.upperBound(options.index.upper); + bounds = IDBKeyRange.upperBound(options.index.upper, excludeUpper); } else if (options.index.only) { bounds = IDBKeyRange.only(options.index.only); } diff --git a/js/models/conversations.js b/js/models/conversations.js index 238f7b556e6a..9a2e873f9c95 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -408,7 +408,8 @@ index: { name: 'search', // 'search' index on tokens array lower: query, - upper: upper + upper: upper, + excludeUpper: true } }).always(resolve); }.bind(this));