From 214233fac24dfe0155a633b75c7cdb924798cea9 Mon Sep 17 00:00:00 2001 From: Bradley Maier Date: Thu, 7 Jan 2016 15:13:03 -0500 Subject: [PATCH] Fix #169: Replace UA sniff with feature detect to fix tests in Edge Resolves #170. (cherry picked from commit d6ef5770f74962b6ad0e739a051d9b05ba919152) --- tests/LocalDB.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/LocalDB.js b/tests/LocalDB.js index d4a9df7..0423a21 100644 --- a/tests/LocalDB.js +++ b/tests/LocalDB.js @@ -88,9 +88,13 @@ define([ options = undefined; } return function () { - if (options && options.multi && has('trident')) { - // sadly, IE doesn't support multiEntry yet - return; + if (options && options.multi) { + try { + IDBKeyRange.only([ 1 ]); + } catch (error) { + // If we land here, we're in IE or Edge and multiEntry is not supported + return; + } } var i = 0; var collection = numberStore.filter(filter, options);