refactor: shorter require

This commit is contained in:
Hadar 2019-09-22 00:25:15 +03:00
parent 8e7a5369cc
commit a2086cd09c

5
sea.js
View File

@ -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;