mirror of
https://github.com/amark/gun.git
synced 2026-03-11 03:04:49 +00:00
refactor: shorter require
This commit is contained in:
5
sea.js
5
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;
|
||||
|
||||
Reference in New Issue
Block a user