Skip to content

Commit 5ea3c88

Browse files
committed
Update: support Microsoft Edge
1 parent 4c8e24e commit 5ea3c88

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

gulpfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ var KARMA_CONFIG = {
226226
};
227227
var KARMA_BROWSERS = {
228228
local: ["Chrome", "Firefox"],
229-
saucelabs: ["SL_Chrome", "SL_Firefox", "SL_Safari_7", "SL_Safari_8", "SL_Safari_9", "SL_IE_10", "SL_IE_11"]
229+
saucelabs: ["SL_Chrome", "SL_Firefox", "SL_Safari_7", "SL_Safari_8", "SL_Safari_9", "SL_IE_10", "SL_IE_11", "SL_EDGE"]
230230
};
231231
// allow for IE on windows
232232
if (/^win/.test(process.platform)) {

lib/algorithms/helpers.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ exports.setupFallback = function(nodejs, webcrypto, fallback) {
120120

121121
function check(err) {
122122
if (err.code === DOMException.NOT_SUPPORTED_ERR ||
123-
err.message === "Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData") {
123+
// Firefox rejects some operations erroneously complaining about inputs
124+
err.message === "Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData" ||
125+
// MS Edge rejects with not an Error
126+
!(err instanceof Error)) {
124127
// not actually supported -- always use fallback
125128
impl = fallback;
126129
return impl.apply(null, args);

0 commit comments

Comments
 (0)