From a2086cd09c2048b092c02489614276ea2e38bf9f Mon Sep 17 00:00:00 2001 From: Hadar Date: Sun, 22 Sep 2019 00:25:15 +0300 Subject: [PATCH] refactor: shorter require --- sea.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sea.js b/sea.js index 99165467..c496e2df 100644 --- a/sea.js +++ b/sea.js @@ -170,10 +170,7 @@ var o = {}; if(SEA.window){ - api.crypto = window.crypto || window.msCrypto; - if(!api.crypto) { - api.crypto = require('isomorphic-webcrypto'); - } + api.crypto = window.crypto || window.msCrypto || require('isomorphic-webcrypto'); api.subtle = (api.crypto||o).subtle || (api.crypto||o).webkitSubtle; api.TextEncoder = window.TextEncoder; api.TextDecoder = window.TextDecoder;