mirror of
https://github.com/amark/gun.git
synced 2025-06-07 06:36:46 +00:00
refactor: shorter require
This commit is contained in:
parent
8e7a5369cc
commit
a2086cd09c
5
sea.js
5
sea.js
@ -170,10 +170,7 @@
|
|||||||
var o = {};
|
var o = {};
|
||||||
|
|
||||||
if(SEA.window){
|
if(SEA.window){
|
||||||
api.crypto = window.crypto || window.msCrypto;
|
api.crypto = window.crypto || window.msCrypto || require('isomorphic-webcrypto');
|
||||||
if(!api.crypto) {
|
|
||||||
api.crypto = require('isomorphic-webcrypto');
|
|
||||||
}
|
|
||||||
api.subtle = (api.crypto||o).subtle || (api.crypto||o).webkitSubtle;
|
api.subtle = (api.crypto||o).subtle || (api.crypto||o).webkitSubtle;
|
||||||
api.TextEncoder = window.TextEncoder;
|
api.TextEncoder = window.TextEncoder;
|
||||||
api.TextDecoder = window.TextDecoder;
|
api.TextDecoder = window.TextDecoder;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user